Skip to content

Fix Turkish-locale casing bug in slot type id#621

Open
munzzyy wants to merge 1 commit into
TheIllusiveC4:26.xfrom
munzzyy:fix/turkish-locale-slot-id
Open

Fix Turkish-locale casing bug in slot type id#621
munzzyy wants to merge 1 commit into
TheIllusiveC4:26.xfrom
munzzyy:fix/turkish-locale-slot-id

Conversation

@munzzyy

@munzzyy munzzyy commented Jul 5, 2026

Copy link
Copy Markdown

Fixes #611.

Preset.id() calls toString().toLowerCase() with no locale, so it uses whatever locale the JVM is running under. On a Turkish locale (-Duser.language=tr -Duser.country=TR), toLowerCase() turns I into a dotless ı (U+0131) instead of i. That turns CURIO into curıo, which isn't a valid resource path, and the game crashes on startup building CuriosTags.

Switched it to toLowerCase(Locale.ROOT) so the id is locale-independent.

I only touched this one call site since it's the one in the crash trace. There are a few other toLowerCase()/toUpperCase() calls elsewhere in the codebase (DropRule, SlotType, CurioSlot, SlotData, CuriosClientEvents) that take the same risk if the input string ever contains a locale-sensitive letter. Left them out of this PR to keep the diff focused, but flagging them here in case a follow-up sweep is worth doing.

Couldn't run a full build locally (NeoForge/Gradle toolchain), so this hasn't been tested in a running game. The change itself is a one-line locale fix with well-defined behavior, but wanted to be upfront about that.

Preset.id() used toLowerCase() with the system locale. On a Turkish
locale JVM, 'I' lowercases to dotless 'ı' (U+0131), turning CURIO into
an invalid resource path (curıo) and crashing at startup.

Use Locale.ROOT so slot ids stay locale-independent.
@natieboi1

Copy link
Copy Markdown

hi! sorry i don't get this, so like is this fixed now? my friend whos system is in turkish is facing this problem right now

we are using the modpack ATM11

how do i fix this? thank you!

@munzzyy

munzzyy commented Jul 8, 2026

Copy link
Copy Markdown
Author

hi! sorry i don't get this, so like is this fixed now? my friend whos system is in turkish is facing this problem right now

we are using the modpack ATM11

how do i fix this? thank you!

If they allow it in yes it will be fixed

@natieboi1

natieboi1 commented Jul 8, 2026 via email

Copy link
Copy Markdown

@munzzyy

munzzyy commented Jul 9, 2026

Copy link
Copy Markdown
Author

The actual code fix is one line in CuriosSlotTypes.java (toLowerCase() -> toLowerCase(Locale.ROOT)), but that's compiled into the mod jar, so editing it yourself would mean building Curios from source with NeoForge/Gradle - not something worth doing just to play the modpack.

The practical workaround: force English as the JVM locale for the game itself, so toLowerCase() never hits the Turkish "dotless i" behavior in the first place. In your launcher (CurseForge/whatever ATM11 uses), find the JVM/Java arguments field and add:

-Duser.language=en -Duser.country=US

That overrides the locale Minecraft launches with regardless of the OS locale, so it should stop the crash without your friend having to change their whole system language. I haven't tested this on ATM11 specifically, but it's the standard fix for this class of Java locale bug and matches what this PR changes under the hood.

It's still TheIllusiveC4's call whether/when to merge - I don't maintain this mod.

@natieboi1

natieboi1 commented Jul 10, 2026 via email

Copy link
Copy Markdown

@munzzyy

munzzyy commented Jul 10, 2026

Copy link
Copy Markdown
Author

That's odd if the args are actually in place - RAM allocation wouldn't touch this at all, so it's possible your friend is hitting a different crash entirely and we're just guessing in the dark right now.

Can you grab the crash report or latest.log from the instance folder (crash-reports/ or logs/latest.log) and paste it, or link it somewhere like Pastebin/Gist? That'll tell us for sure - if it's this bug the log will mention a slot type id with a weird capital I in it. It also has a line near the top listing the actual JVM flags the game launched with, so we can check the -Duser.language args actually made it into that instance and not just the launcher's default profile. Some launchers apply "global" Java args to new instances but not existing ones, so ATM11 might need the flags set on the instance itself rather than wherever your friend put them.

If the log turns out to be something else, this thread won't really be the place to sort it out - that'd be worth its own report on the ATM11 pack's issue tracker with the log attached.

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.

[Bug]: Crash: Invalid FS/resource paths due to Enum toLowerCase using system locale

2 participants