Skip to content

Windows character output is garbled #447

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

Closed
ahaoboy opened this issue Jun 28, 2024 · 4 comments
Closed

Windows character output is garbled #447

ahaoboy opened this issue Jun 28, 2024 · 4 comments

Comments

@ahaoboy
Copy link

ahaoboy commented Jun 28, 2024

I'm not sure if it's a qjs encoding problem or a windows setting problem, the output in both windows terminal and vscode terminal is garbled.

console.log('│')

image

It is correct to use redirection to write output to a file

 ./build/qjs ./a.js > a.txt

image

@andrjohns
Copy link
Contributor

The error is happening because the pipe character you've specified is not the standard pipe, it's a different unicode symbol: https://apps.timwhitlock.info/unicode/inspect?s=console.log%28%27%E2%94%82%27%29

Not sure what the spec says about how this should be parsed, @saghul?

@andrjohns
Copy link
Contributor

Spoke too soon sorry, it's actually a windows-specific issue with parsing unicode inputs in js_load_file

@ahaoboy
Copy link
Author

ahaoboy commented Jun 28, 2024

This problem seems to have been encountered before, but it has not been solved.
bellard/quickjs#220

@saghul
Copy link
Contributor

saghul commented Oct 7, 2024

Fixed in #449

@saghul saghul closed this as completed Oct 7, 2024
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

3 participants