It is cool to have you three on board. I love your discussions because
I'm learning by immersion.
Le 6/1/16 09:58, Nicolai Hess a écrit :
see issues 17302/17242/17227
String>>findString:startindAt:caseSensitive appears to be failing for
extended charsets
String>>compare:caseSensitive seems to be failing for extended charset
comparisons
String>>beginsWithEmpty:caseSensitive: has test failure for some cases
the problem is, the standard character set used for building the
CaseInsensitiveOrder map
only maps characters from the set of ascii characters but it is used
in the findString/compare/beginsWith-methods for all byte characters.
Any objections if we fill this map like it is suggested in case 17242 ?
CaseInsensitiveOrder := AsciiOrder copy.
(0 to: 255) do:[ :v |
| char upper |
char := v asCharacter.
upper := char asUppercase.
upper isOctetCharacter
ifFalse: [ upper := char ].
CaseInsensitiveOrder at: char asciiValue + 1 put:
(CaseInsensitiveOrder at: upper asciiValue + 1) ].
(the check for #isOctectCharacter is needed because for some entries
the correspondending
uppercase character is not within this character set).
This would solve all three issues.
nicolai