[Seaside-dev] A little bit more on encodings

Philippe Marschall philippe.marschall at gmail.com
Tue Jun 16 04:54:43 UTC 2009


2009/6/15 Michael Lucas-Smith <mlucas-smith at cincom.com>:
> Hi All,
>
> I'm digging in to why WAEncodingFunctionalTest was failing for me and
> discovered that the WABufferedResponse is not set up the way I would expect.
>
> It has a header that says the content-type's charset is utf8, however the
> actual contentsStream is a WANullCodecStream wrapped around a plain
> WriteStream containing a collection of a TwoByteString of characters.
>
> Basically... no encoding has gone on at all - so naturally when I try to
> send the response back to the browser, it's not bytes and it's not utf8, so
> i get gibberish.
>
> Where was the content type of the response even supposed to have been setup?

Nowhere. WANullCodec provides compatibility with "the way it has
always been done", you say you want utf-8 and you're supposed to
deliver utf-8. No conversion is done for you.

Cheers
Philippe


More information about the seaside-dev mailing list