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

Special characters in German language translation are considered as surrogates and halt compression #340

Open
qdpy opened this issue Nov 15, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@qdpy
Copy link

qdpy commented Nov 15, 2024

Distribution

N/A (the distribution does not matter; please explain why if it's not obvious)

Bug description

The de_de.json translation file contains special characters that are considered as lone leading surrogates, which leads to JSON parsing errors and stops compression. The error message is as follows:

! assets/minecraft/lang/de_de.json: JSON error: lone leading surrogate in hex escape at line 1 column 22445

"F\u00fcnfbl\u00e4ttriges Kleeblatt"

Reproduction steps

Compress the pack

Expected behavior

Attached files

No response

Additional context

No response

@qdpy qdpy added the bug Something isn't working label Nov 15, 2024
@AlexTMjugador
Copy link
Member

PackSquash supports Latin letters with diaeresis in their escaped form, along with most other characters from the Basic Multilingual Plane (BMP), as expected. I verified this by creating a pack file at assets/minecraft/lang/de_de.json with the following content: "F\u00fcnfbl\u00e4ttriges Kleeblatt". PackSquash processed the file successfully.

If you can reproduce this same result on your end, which I consider extremely likely, the issue cannot stem from these specific characters. Moreover, the high column count in the error message suggests that the file is a minified, non-vanilla JSON, which can make pinpointing the exact error location and cause more difficult, so could you attach the problematic file for analysis? I don't see this issue being investigated further without clear evidence of its source.

@AlexTMjugador AlexTMjugador added the invalid This doesn't seem right label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants