[Seaside-dev] Character >> #asInteger

Philippe Marschall philippe.marschall at gmail.com
Sun Dec 14 16:12:28 UTC 2008


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

Do other dialects do similar nonsense when it comes to characters?

Sorry about my previous message.

Cheers
Philippe


More information about the seaside-dev mailing list