KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
297 stars 87 forks source link

DRAFT: Use Locale.ROOT for converting script file names to lower case #856

Closed McModknower closed 2 weeks ago

McModknower commented 3 weeks ago

Description

This prevents an issue faced by players with the Turkish language, as an uppercase I is changed to a lowercase dotless ı in that locale, which is not a valid character for resource names.

Example Script

Any script with a capital I in the file name should trigger the bug before this pr, when using the turkish locale via -Duser.language=tr to force the turkish language for minecraft. Note that MultiMC automatically add -Duser.language=en after the java arguments from the user, masking this bug even when trying to trigger it.

Other details

This is currently a draft since i want to discuss what other instances of toLowerCase/toUpperCase should be changed to include the root locale.

Edit: as a workaround players can add -Duser.language=en to their Java arguments.

Here is an example crash from a player that had this issue: crash-2024-06-01_03.45.49-fml.txt

LatvianModder commented 2 weeks ago

Implemented in 1.21

McModknower commented 2 weeks ago

Is the implementation not pushed yet or in another repository? I can't seem to find it in the main or 2004 branch.