[Seaside-dev] about Grease codecs

Andreas Raab andreas.raab at gmx.de
Tue Mar 30 08:42:03 UTC 2010


On 3/30/2010 1:01 AM, Paolo Bonzini wrote:
> On Tue, Mar 30, 2010 at 09:35, Andreas Raab<andreas.raab at gmx.de>  wrote:
>> On 3/29/2010 11:29 PM, Lukas Renggli wrote:
>>>>
>>>> How are Codecs meant to be implemented exactly?  The tests are not
>>>> clear, and it looks like they are supposed to convert only to and from
>>>> ISO-8859-1.
>>>
>>> Codecs are implemented like this:
>>>
>>>     decoder: something -->    internal encoding
>>>     encoder: internal encoding -->    something
>>>
>>> One of the two encodings is always the internal encoding of the
>>> Smalltalk you are using. In case of Pharo/Squeak this is obviously
>>> ISO-8859-1.
>>
>> I'm probably missing something here but shouldn't this be Unicode? Squeak
>> (and as a result Pharo) uses Unicode internally, so why would the internal
>> encoding be "obviously" ISO-8859-1? Doesn't that also imply that most actual
>> conversions (Mac Roman, UTF-8) are lossy in general?
>
> I don't know; I said ISO-8859-1 because that's what I got from
> SqueakSource when I downloaded Seaside.

Easy to find out. Just put a Euro sign into the UTF8Converter and see 
what the result is. The Euro sign is U+20AC so try converting from/to 
(Character value: 8364) and #[226 130 172] and see if that works.

Cheers,
   - Andreas


More information about the seaside-dev mailing list