Repository navigation
Conversation
Root node tag names and the nested :HAS[ search were compared with CurrentCultureIgnoreCase. Under a Turkish or Azeri culture, i and I are not a case pair, so :first and :final in any casing other than all uppercase were not recognized. Use OrdinalIgnoreCase instead. Pass specifier descriptors uppercased the mod name with the current culture, turning i into U+0130. Use ToUpperInvariant, as PatchList already does for pass names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Ah, the joy of i8n. Thanks for the patch. |
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.
Currently, the mod uses
CurrentCultureIgnoreCasefor various tag names and searches. In Turkish (or some other language(s)),iandIhave alternative other-case forms, so:firstand:finalare not recognized. This PR usesOrdinalIgnoreCaseinstead.Currently, the mod applies
ToUpperto mod names for pass filters, which turnsiintoİ, triggering the same failure. This PR usesToUpperInvariantinstead.This bug is not currently visible in normal use, because KSP's
HighLogic.Awakeresets the locale before the MM thread inherits it. It is, however, visible if another mod resets the main thread culture after the vanilla reset but before MM runs, or builds a MMProtoPatchBuilderorPatchExtractorin a thread with a triggering locale.AI Disclosure
I am working on a project that depends on KSPMMCfgParser, which led me to a larger case sensitivity problem there (KSP-CKAN/KSPMMCfgParser#25). Investigating that problem revealed this one. I tasked Claude Opus 5.5 with narrowing the problem here and finding all of the case sensitive string comparison sites. It also wrote the tests in this PR and the commit message. I wrote the PR body based on my understanding of the issue and the fix.