Repository navigation
🐛 Use locale-independent case conversion for stdlib files, SVG attributes and keywords - #2980
Merged
Merged
Conversation
…utes and keywords With a Turkish default locale (tr_TR), String.toLowerCase() maps "I" to a dotless "ı" and toUpperCase() maps "i" to a dotted "İ". Four places used the default locale for machine names: - SpmChannel.getFileName(): INFO and IMAGE became "ınfo.spm" and "ımage.spm", so every !include <...> from the standard library failed with FileNotFoundException. - UGroupType.getSvgKeyAttributeName(): SVG output got attributes such as data-source-lıne and data-qualıfıed-name, and a <tıtle> element. - ColorType.getType(): "#line:red" crashed with "No enum constant ColorType.LİNE". - GanttTaskTableColumn: "hide column duration" was silently ignored. Use the existing StringUtils.goLowerCase()/goUpperCase() helpers, which pin Locale.ENGLISH, and add a test that runs under tr-TR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the JVM default locale is Turkish (
-Duser.language=tr -Duser.country=TR, or a Turkish OS),toLowerCase()turnsIinto a dotlessıandtoUpperCase()turnsiintoİ. Four places use the default locale for names that are not user text:SpmChannel.getFileName()producesınfo.spm/ımage.spm, so every!include <...>from the standard library fails:java.io.UncheckedIOException: java.io.FileNotFoundException: stdlib\c4\ınfo.spmUGroupType.getSvgKeyAttributeName(): SVG output getsdata-source-lıne,data-qualıfıed-name,data-entıty-uıdand a<tıtle>elementColorType.getType():class Foo #line:redfails withNo enum constant ...ColorType.LİNEGanttTaskTableColumn:hide column durationis silently ignoredThe change uses the existing
StringUtils.goLowerCase()/goUpperCase()helpers (Locale.ENGLISH).TurkishLocaleTestruns under@DefaultLocale("tr-TR")and covers all four; it fails on master and passes with the change.Other
toLowerCase()/toUpperCase()calls without a locale are left alone here (mostly log text); happy to sweep more if useful.I used Claude Code to write this change.