[Seaside-dev] Character >> #asInteger

Dale Henrichs dale.henrichs at gemstone.com
Sun Dec 14 17:03:45 UTC 2008


----- "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
| 
| Do other dialects do similar nonsense when it comes to characters?

We are pretty much settling on the Unicode character set. We have a couple of non-Unicode character sets, but we're encouraging people to use Unicode.

#asUnicode won't create a conflict for GemStone.

Dale


More information about the seaside-dev mailing list