[Seaside] 3.9 and encoding

Norbert Hartl norbert at hartl.name
Tue Feb 27 23:38:36 UTC 2007


On Wed, 2007-02-28 at 00:26 +0100, Philippe Marschall wrote:
> 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.
> 
Oh, this seems quite easy. But I didn't found anything to configure
in the Postgres driver. Do you have any hint? 

Norbert



More information about the Seaside mailing list