Bug 44083

Informational

GemStone/S 64 Bit

3.6, 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

Cannot execute = or other comparisons with mixed traditional/unicode strings

Unicode strings use the ICU libraries to perform equality operations, while traditional strings use traditional character-based equality. To avoid some conditions where the equality semantics are different, equality comparisons between a traditional and Unicode string using = have been disallowed in v3.2

This change impacts operations such as includes: that rely on = to identify objects, as well as ordering of objects in collections using <, <=, >, and >=. Identity-based comparisons using == or ~~ are unaffected.

Workaround

You should avoid mixing traditional and Unicode strings in collections.

Using compareTo:collator: will allow any strings to be compared using Unicode rules.

If you enable Unicode comparison mode, it will redefine = for traditional strings and symbols to use the ICU libraries to perform equality and ordering operations; in which case compares will not longer be an issue.


Last updated: 5/5/14