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

captured stdout has corrupted characters (U+FFFD) #566

Closed
mustafa0x opened this issue Jan 8, 2023 · 0 comments
Closed

captured stdout has corrupted characters (U+FFFD) #566

mustafa0x opened this issue Jan 8, 2023 · 0 comments

Comments

@mustafa0x
Copy link

zx --repl

let url = 'https://ar.wikipedia.org/wiki/%D8%A7%D9%84%D8%A8%D8%B1%D8%A7%D8%B2%D9%8A%D9%84'
let contents = (await $`curl -s ${url}`.quiet()).stdout
require('fs').writeFileSync('airplane.html', contents)

results in corrupted characters (U+FFFD); run grep -m 1 -o � airplane.html to verify. Redirecting curl output to a tmpfile (within zx) avoids this bug.

Specifications

  • Version: zx 7.1.1 / node v18.13.0
  • Platform: Mac
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

No branches or pull requests

2 participants