Women in Technology

Hear us Roar

  Two Servlet Filters Every Web Application Should Have
Subject:   Unexpected chars
Date:   2004-02-13 02:56:11
From:   sjxs
Upon inserting the GZIP filter into my web app I now get problems with 'special' characters (french accented, umlauts, pound signs etc...) getting mangled somehow. I set the response encoding to be utf-8 and I have no problems using the application and displying the xml it produces in Internet Explorer. When I put the GZIPfilter in the chain Internet Explorer throws an error complaining about the first unexpected char it finds. <br/><br/>Anyone else having teh same problem or know what it could be? I am using the latest version of the code. <br/>Cheers,<br/>Sam

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Unexpected chars
    2004-02-13 09:16:44  sjxs [View]


    My fault... I got the writer before setting the character encoding to utf-8... so the xml was being output in ISO8859-1 in response to the request and I was saying that it was encoded in UTF-8 when it wasn't. Setting the content-type before retrieving the writer is a darn good idea.... :)