On Tue, Jul 30, 2002 at 12:53:58AM -0700, Daniel Bruce Lynes wrote:
> On Tuesday 23 July 2002 04:03, Ryszard Lach wrote:
> 
> > Could anyone explain how are non-ascii characters processed by Tomcat ?
> > I have the following configuraton:
> >
> > Tomcat 4.0.3 running with apache (mod_webapp), environment: LANG=pl_PL,
> > JDK1.4.0 with command-line parameter
> > -Djavax.servlet.request.encoding=ISO-8859-2
> >
> > JSP page with '<%@ page contentType="text/html;CHARSET=ISO-8859-2" %>'
> > declared.
> >
> > All polish characters are displayed in the browser correctly, they also
> > are inserted into database correctly, but I cannot receive them in
> > e-mail sent from the JSP page - all non-ASCI characters are coming in
> > the message as proper LATIN2 characters preceded by 'Â' or 'Ă'
> > characters. When I look at the generated from JSP Java code in
> > ~catalina/work directory, I see exactly the same.
> 
> Are you sure the characters you stored in the database are stored in Latin2, 
> and not unicode?

Yes, I am.

> > Decompiled (generated from JSP) class contains octal codes of LATIN2
> > characters (i suppose there should be rather UNICODE character's codes).
> 
> Octal codes?  Could you give an example of what you are calling an 'octal 
> code'?

e.g. \261

I trully don't understand how, but it worked when I used

new String (body.getBytes ("ISO-8859-1"), "ISO-8859-2")

instead of just 'body'.

Regards,

Richard.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocław **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to