[Seaside] 3.9 and encoding

Philippe Marschall philippe.marschall at gmail.com
Tue Feb 27 23:26:11 UTC 2007

2007/2/28, Norbert Hartl <norbert at hartl.name>:
> Hi,
> I ran into a encoding problem. I'm using seaside together
> with Glorp. For the web server I use WAKomEncoded39.
> WAKomEncoded39 converts the output to the browser to utf-8.
> But on incoming requests the url escaped characters are
> translated to something different. For me it appears to
> be latin-1 but I've no glue why it should be that way.
> I detected it because my postgresql session has client
> encoding utf-8 turned on and I get an error trying to
> store strings containing characters like ö.

If you run WAKomEncoded39 on Squeak 3.9 you will have strings with
(new) Squeak encoding in your image which is basically non-unified
unicode. For latin-1 characters this will be indistinguishable from
latin-1. If your database is utf-8 you need to encode your strings to
utf-8 when writing them to your database and decode your strings from
utf-8 when reading from the database (only to convert it back to utf-8
when generating html). You can configure the PostgreS database driver
to do this automatically for you.

An other option is to have utf-8 strings in your image. On Squeak 3.9
this requires WAKom and a modified version of KomHttpServer not
publicly available. This has the advantage that you don't need to do
encoding conversion it has however the disadvantage that it won't work
with the debugger, #size doesn't work and directly indexing into the
string (creating substrings) won't work too. Additionally you need to
convert you string literals to utf-8 (unless they're ascii).


> I read on the net that this has something to do with 3.9.
> Is this still true? Is there a way to make it run or is
> the only way to go back to 3.8?
> thanks in advance,
> Norbert
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the Seaside mailing list