Skip to content

Conversation

@yardenshoham
Copy link
Collaborator

stdout and stderr have the type Uint8Array

`stdout` and `stderr` have the type `Uint8Array`c

Signed-off-by: Yarden Shoham <[email protected]>
@silverwind
Copy link
Collaborator

silverwind commented Mar 27, 2024

I think TextDecoder would be the better method because that can handle UTF-8 while your current method likely cannot (It seems to only support UTF-16).

const decoder = new TextDecoder();
const decodeToString = (arr: UInt8Array): string => decoder.decode(arr);

Also see https://stackoverflow.com/questions/8936984

Signed-off-by: Yarden Shoham <[email protected]>
@yardenshoham yardenshoham enabled auto-merge (squash) March 28, 2024 06:40
@yardenshoham yardenshoham merged commit e863e8b into main Mar 28, 2024
@yardenshoham yardenshoham deleted the fix-err-log branch March 28, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants