Skip to content

The std and os modules do not support Unicode paths for file operations #505

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

Open
CenterCountryMan opened this issue Sep 7, 2024 · 2 comments

Comments

@CenterCountryMan
Copy link

The std and os modules do not support Unicode paths for file operations; if the path contains Unicode characters, the result returned is null. Additionally, the console does not support outputting Unicode content by default, which can result in garbled characters. I hope this issue can be resolved.

@bnoordhuis
Copy link
Contributor

You don't mention the OS but I'm going to guess... Windows?

std and os are mostly implemented in terms of libc/msvcrt and unicode suport in msvcrt is seriously lackluster. So, the answer to your feature request is "probably not", or we'd be reinventing libuv. See #449 for unicode console support, however.

If you're embedding quickjs and your target is windows 10, you can add an <activeCodePage>UTF-8</activeCodePage> stanza to your app's manifest. Maybe we could do that for qjs (the standalone binary) but not for quickjs the library.

@CenterCountryMan
Copy link
Author

You don't mention the OS but I'm going to guess... Windows?

std and os are mostly implemented in terms of libc/msvcrt and unicode suport in msvcrt is seriously lackluster. So, the answer to your feature request is "probably not", or we'd be reinventing libuv. See #449 for unicode console support, however.

If you're embedding quickjs and your target is windows 10, you can add an <activeCodePage>UTF-8</activeCodePage> stanza to your app's manifest. Maybe we could do that for qjs (the standalone binary) but not for quickjs the library.

Sorry, I saw your reply a bit late. I was indeed talking about the Windows platform. However, I’m still very much looking forward to solving this issue. After all, JavaScript is a very modern technology, and if QuickJS’s default library could also support Unicode, that would make QuickJS even more powerful. Thank you once again!

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