[Seaside] Encoding question

Andres Fortier andres at lifia.info.unlp.edu.ar
Thu Jun 5 19:50:28 UTC 2008

Hi Philippe, sorry for not responding earlier. I guess there must be 
some kind of mess in my image, since the encoding tests work ok. 
However, if I inspect the 'urlencoded' iv when submitting the form, I 
get a string with garbage. On the other hand, the streams are 
EncodedStreams with a utf-8 encoder; however if I write a special 
character (say 'é') in the browser, I can see it ok inside the image, 
but it can't be rendered in the html page. Thus, there must be an 
encoding mismatch somewhere, but I'm not able to find it. I guess I'll 
be spending quite a while debugging this :(.

Thanks again for your help!


Philippe Marschall escribió:
> 2008/6/3, Andres Fortier <andres at lifia.info.unlp.edu.ar>:
>> Hi Sebastian, Philippe:
>>                                   sorry for the short description: I'm using
>> seaside in VW 7.4.1 (actually Swazoo + Seaside). Encoding is UTF-8 in the VW
>> image.
> Well that should work. Supposed you have Seaside 2.8, can you go to
> /seaside/tests/alltests
> (you probably need a go somewhere)
> and run the encoding test?
>> Now, I guess I must be wrong in this, but isn't WAHtmlEncoder
>> supposed to do the conversion between special characters and html entities?
>> I found kind of weird the standard implementation of #encode:on: since it
>> makes you think that this is the purpose of this class. So I guess I should
>> rephrase my question: what is WAHtmlEncoder supposed to do? Who should be in
>> charge of translating the html entities? The web server?
> No one, really. The only characters you need to escape are $" $< $&
> and $> which is exactly what WAHtmlEncoder does. What the web server
> is supposed to do is encode from characters to bytes. If your image
> encoding is utf-8 then is a simply one to one mapping (given your page
> encoding is utf-8 as well).
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list