[Seaside-dev] Character >> #asInteger

Paolo Bonzini bonzini at gnu.org
Sun Dec 14 19:14:47 UTC 2008


Dale Henrichs wrote:
> ----- "Philippe Marschall" <philippe.marschall at gmail.com> wrote:
> 
> | Hi
> | 
> | There are several places in Seaside where we send #asInteger to a
> | Character an expect to get the code point. The problem is that on
> | Squeak 3.8+ #asInteger (the same way as #asciiValue) has totally
> | perverted semantics. If the character is a non-Latin-1 character
> | (actually if the code point is higher than 255) then leadingChar will
> | be bit  twiddled into the code point.
> | 
> | So if you set up your image the "correct" way you're in for some nice
> | surprises. To avoid all this we'd have to send #asUnicode.
> | 
> | We have three choices
> | - force Squeak-ishms on everybody (#asUnicode) and hope and pray we
> | don't get any clashes (worked really well for #toString)
> | - don't support Squeak EncodedCharSet and if something breaks tell
> | the
> | users it's their fault
> | - #seasideAsInteger

What's wrong with #codePoint, which is the ANSI name?  Secondarily,
#seasideAsUnicode or #seasideCodePoint would work too.

Paolo


More information about the seaside-dev mailing list