quickjs-ng / quickjs

QuickJS, the Next Generation: a mighty JavaScript engine
MIT License
687 stars 66 forks source link

Support printing unicode characters on windows #449

Open andrjohns opened 2 days ago

andrjohns commented 2 days ago

From #447, Unicode characters are not correctly printed to the console with console.log in some cases

andrjohns commented 2 days ago

@ahaoboy Can you try this branch to check that it works for you? All works as expected for me locally, but good to double-check

ahaoboy commented 2 days ago

Can you try this branch to check that it works for you?

Cool~ It works!

chqrlie commented 2 days ago

We might want to add an alternative function JS_ToWStringLen to convert a JS_STRING to a UTF-16 encoded wide string and use that for output. It would help if Microsoft would finally make it easy to use UTF-8 like the rest of the world.