Bug 44157

Informational

GemStone/S 64 Bit

3.7.1, 3.7, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.1, 3.3, 3.2.16, 3.2.15, 3.2.14, 3.2.13, 3.2.12, 3.2.11, 3.2.10, 3.2.9, 3.2.8.1, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2, 3.1.0.6, 3.1.0.5, 3.1.x

Default IcuCollator must remain the same for reliable string collation

Collation of Unicode strings (Unicode7, Unicode16, and Unicode32), depends on an instance of IcuCollator. Unless an IcuCollator is specifically supplied for the comparison, the default IcuCollator for the session is used. The default IcuCollator for the session is set during login based on the current OS locale.

This means that sessions that log in to the same repository from different locales may see differently collated Unicode strings. If using a SortedCollection rather than an IcuSortedCollection, these results may be persistent, and may result in lookup failures. Indexes on Unicode Strings (in v3.2 and later) persist the collator on index creation, and so avoid problems.

The default IcuCollator also be set explicitly by setting either the IcuCollator default: or the IcuLocale default:. This has the same risk as changing default IcuCollator based on OS locale.

Workaround

Use IcuSortedCollection rather than SortedCollection.  When sorting a particular collection according to customized rules, specify the collator for that sort, rather than changing the default collator.

If your gem will be in multiple locales with different collation rules, consider explicitly setting the default session collator for each gems on login.


                

Last updated: 4/11/17