Re: Issue 2353 in pharo: #findString:startingAt:caseSensitive: broken for WideStrings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Issue 2353 in pharo: #findString:startingAt:caseSensitive: broken for WideStrings

pharo
Updates:
        Status: Accepted
        Cc: siguctua

Comment #6 on issue 2353 by stephane.ducasse:  
#findString:startingAt:caseSensitive: broken for WideStrings
http://code.google.com/p/pharo/issues/detail?id=2353

Igor it would be nice if you could have a look in the coming month.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 2353 in pharo: #findString:startingAt:caseSensitive: broken for WideStrings

pharo

Comment #7 on issue 2353 by [hidden email]:  
#findString:startingAt:caseSensitive: broken for WideStrings
http://code.google.com/p/pharo/issues/detail?id=2353

I 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)....