----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Sergiy Vasylyev wrote:
> Hi,
> I am running running Apache/1.3.12 (Unix), ApacheJServ/1.1.2 on Linux.
> In following piece of code (index.jsp): <%@ page contentType="text/html;
> charset=windows-1251" %>
> charset gets set to cyrillic, GnuJSP translates it to Java code
> response.setContentType ("text/html; charset=... into servlet (container),
> but it doesn't seem to work further. Instead of meaningful text in cyrillic
> all I am getting is question marks. I am sure it is not browser problem,
> because if I remove setContent... from servlet and set my browser
> explicitly(manualy) to Cyrillic charset everything is fine.
>
> Thank.
> Sergiy
I don't know how GnuJSP translates the jsp pages into servlets,
but I suppose that the problem is that the compiler uses ISO-8859-1
encoding when compiling the resulting servlet into a .class file.
The evidence is that when you remove setContent and set browser
manually it works. It's because then the 8bit->16bit and 16bit->8bit
conversions are opposite and you get into your browser exactly the
same 8bit characters as were in the original jsp page, just
without proper Content-type header.
So make sure that during compilation of jsp pages the compiler
uses windows-1251 encoding instead of ISO-8859-1.
Martin
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]