Skip to content

fix: force UTF8 on yaml parsing#4178

Merged
iBotPeaches merged 3 commits into
mainfrom
charset-8
Jul 22, 2026
Merged

fix: force UTF8 on yaml parsing#4178
iBotPeaches merged 3 commits into
mainfrom
charset-8

Conversation

@iBotPeaches

Copy link
Copy Markdown
Owner

Our test suite forces UTF8, but userland did not. I experienced this in #4175

@IgorEisberg

Copy link
Copy Markdown
Collaborator

Interesting issue.

<failure message="org.junit.ComparisonFailure: expected:&lt;...les/Andriod/tx_1001_[冰原]1&gt; but was:&lt;...les/Andriod/tx_1001_[冰原]1&gt;" type="org.junit.ComparisonFailure">

DoNotCompressHieroglyphTest.java:

assertEquals("assets/AllAssetBundles/Andriod/tx_1001_冰原1", apkInfo.getDoNotCompress().get(0));

That constant string in hex:

6173736574732F416C6C417373657442756E646C65732F416E6472696F642F74785F313030315FE586B0E58E9F31

But Java compiles that string in DoNotCompressHieroglyphTest.class as non UTF-8:

6173736574732F416C6C417373657442756E646C65732F416E6472696F642F74785F313030315FC3A5E280A0C2B0C3A5C5BDC5B831

Which is: assets/AllAssetBundles/Andriod/tx_1001_冰原1

And this is despite:

tasks.withType<JavaCompile> {
    ...
    options.encoding = "UTF-8"
}

@IgorEisberg

Copy link
Copy Markdown
Collaborator

Looks like tasks.withType<JavaCompile> had to be under subprojects to work properly with a multi-module project.

@iBotPeaches

Copy link
Copy Markdown
Owner Author

weird. Unsure how it worked prior and then broke when it was explicitly mapped as UTF-8.

@iBotPeaches
iBotPeaches merged commit 8261a52 into main Jul 22, 2026
18 checks passed
@iBotPeaches
iBotPeaches deleted the charset-8 branch July 22, 2026 10:07
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.

2 participants