Comment #7 on issue 2353 by
[hidden email]:
#findString:startingAt:caseSensitive: broken for WideStrings
http://code.google.com/p/pharo/issues/detail?id=2353I hit this case in a Seaside/Pier image in the wild and the following
expression will reproduce the problem taht I observed:
| str |
str := WideString new: 10 withAll: 45 asCharacter.
str at: 5 put: (Character value: 8217).
str
findString: 'intro'
startingAt: 1
caseSensitive: false.
Yes ... the offending Character value was 8217. I don't know exactly how a
character of that value got into the WideString, but it is there.
The page where the character resides is:
http://book.pharo-project.org/book/introduction/gettingstarted/And the offending character is the $' in the phrase "if you haven’t done so
already"... The Pier image is running with a WAComancheAdaptor that is
doing utf-8 encoding ...
The takeaway is that it is very possible to create an instance of
WideString with Characters whose values are larger than 256 (the size of
the matchTable)....