|
From: Vest <no...@gi...> - 2026-09-26 22:07:41
|
Branch: refs/heads/master Home: https://github.com/PCGen/pcgen Commit: 87185f9622f3c1bd22e868af24618f09e7c09d5f https://github.com/PCGen/pcgen/commit/87185f9622f3c1bd22e868af24618f09e7c09d5f Author: Vest <Ve...@us...> Date: 2026-09-27 (Sun, 27 Sep 2026) Changed paths: M code/src/java/pcgen/core/Equipment.java M code/src/java/pcgen/core/SkillComparator.java M code/src/java/pcgen/core/display/SkillDisplay.java M code/src/java/pcgen/core/utils/CoreUtility.java A code/src/test/pcgen/core/SkillComparatorTest.java A code/src/test/pcgen/core/utils/CoreUtilityEquipmentComparatorTest.java M code/testsuite/csheets/35e_Alice.xml M code/testsuite/csheets/35e_Bob.xml M code/testsuite/csheets/35e_Charlie.xml M code/testsuite/csheets/35e_Dave.xml M code/testsuite/csheets/35e_Eve.xml M code/testsuite/csheets/35e_Fran.xml M code/testsuite/csheets/35e_Gordon.xml M code/testsuite/csheets/35e_Harold.xml M code/testsuite/csheets/35e_Ivan.xml M code/testsuite/csheets/35e_Jango.xml M code/testsuite/csheets/35e_Lauren.xml M code/testsuite/csheets/35e_Mallory.xml Log Message: ----------- fix: CODE-864 internationalized sort for skill and equipment output names (#7748) Skill and equipment output-order sorting used String.compareToIgnoreCase(), which orders by UTF-16 code point. Accented capitals (e.g. 'É' = U+00C9) are above 'Z', so French names like "Épée" sorted after every plain ASCII name instead of near "E" — the defect the original reporter hit for both skills and gear. Replace the compareToIgnoreCase calls in the name comparators with a shared java.text.Collator, matching the existing shared-Collator pattern in CDOMObject/Comparators: - Skills: SkillComparator (RESORT_NAME + RESORT_TRAINED tie-break), SkillDisplay.getSkillListInOutputOrder tie-break. - Equipment: CoreUtility.EQUIPMENT_COMPARATOR (name / applied-name / parent-name tie-breaks, feeds EqToken/WeaponToken export), Equipment.compareTo. Plain ASCII ordering is otherwise preserved; accented/non-English names now collate correctly. Collation also treats spaces/punctuation as negligible, so names differing only by space-vs-digit (e.g. "Test Coding" vs "Test96d") now sort by the following character rather than by raw code point. Adds SkillComparatorTest and CoreUtilityEquipmentComparatorTest, each of which first reproduces the misordering under compareToIgnoreCase, then pins the corrected collated order (stable across Latin locales). Regenerates the 35e csheet golden fixtures to the new collated order; the diffs are pure reorderings (verified: every removed line reappears added). To unsubscribe from these emails, change your notification settings at https://github.com/PCGen/pcgen/settings/notifications |