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

Fix UT8 handling in fs_writefile #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MathemanFlo
Copy link
Contributor

@MathemanFlo MathemanFlo commented Sep 24, 2024

Fixes armory3d/armortools#1768 Thanks to @shiena s investigation it was easy to see that non ascii utf8 glyphs where handled incorrectly because they take more than one byte. charCodeAt retrieves a utf16 code point though because JavaScript stores string in utf16 encoding internally. Therefore the solution to convert to utf8 first.

@shiena
Copy link
Contributor

shiena commented Sep 24, 2024

@MathemanFlo
I tried this patch. The correct character encoding was output in Japanese, so it seems to be OK.

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

Successfully merging this pull request may close these issues.

extra_locales.js does not output utf8
2 participants