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

Parsing fails when the source code contains UTF-8 encoded strings #61

Open
finn-cz opened this issue Nov 29, 2024 · 0 comments
Open

Parsing fails when the source code contains UTF-8 encoded strings #61

finn-cz opened this issue Nov 29, 2024 · 0 comments

Comments

@finn-cz
Copy link

finn-cz commented Nov 29, 2024

When passing source code containing a string with a UTF-8 encoded character, such as the FULL BLOCK (0xE2 0x96 0x88), Python attempts to open the file using the operating system's default encoding, which might be CP1250 or another random code page. In such cases, file reading fails due to encoding mismatches.

There should be either an option to specify the Lua source code encoding explicitly, or the file should be open with encoding='utf-8', errors='ignore' and the output XML written with encoding='utf-8'.

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

1 participant