Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multibyte sequence in output #23

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Fix multibyte sequence in output #23

merged 1 commit into from
Aug 22, 2024

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Aug 22, 2024

This fixes multibyte sequences in result.stdout and result.stderr.

@@ -21,7 +21,6 @@ export async function * combineAsyncIterators(iterator1, iterator2) {
}

export async function * lineIterator(stream) {
stream.setEncoding('utf8');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is only called when the user iterates over promise.stdout or promise.stderr. But result.stdout/result.stderr always need the stream encoding to be utf8.

@sindresorhus sindresorhus merged commit cb4116e into main Aug 22, 2024
6 checks passed
@sindresorhus sindresorhus deleted the stream-encoding branch August 22, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants