tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Mallwitz <c.mallw...@intershop.de>
Subject RE: tomcat 4.0 m4: bug while submitting UTF-8 data to JSP page
Date Tue, 14 Nov 2000 16:57:16 GMT
Hi,

BTW I've checked this with both JDK 1.2.2 and 1.3.0 on W2K.

Bye
Christian
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineer    phone: +49 3641 894 334


> -----Original Message-----
> From: Christian Mallwitz [mailto:c.mallwitz@intershop.de]
> Sent: Monday, November 13, 2000 18:23
> To: tomcat-dev@jakarta.apache.org
> Subject: tomcat 4.0 m4: bug while submitting UTF-8 data to JSP page
> 
> 
> Hi,
> 
> I have a JSP file (see attachment) which lets you submit text 
> in UTF-8 to
> the same JSP file. For this to work the JSP file contains code for
> converting the submitted text from Unicode to UTF-8. 
> 
> I run some test to submit the Euro symbol. In Unicode this is 
> code point
> 0x20ac and in UTF-8 it is 0xE2 0x82 0xAC (3 bytes). It works 
> for all servlet
> engines I know of incl. Tomcat up to 3.2 beta 6 but not for 
> Tomcat 4.0m4
> 
> if you have an URL like http://host/post.jsp?text=%E2%82%AC I 
> expect the
> following output:
> 
> text [as text]   = â'¬
> text [as hex]    = 0xe2 0x82 0xac 
> text [corrected] = EUR
> 
> but I get
> 
> text [as text]   = â'¬
> text [as hex]    = 0xe2 0x201a 0xac 
> text [corrected] = 
> 
> Note the second hex code. Interestingly 0x201a is a Unicode code point
> containing a , character but I'm clueless how Tomcat got there ...
> 
> Bye
> Christian
> PS: I have attached a JSP file for more multibyte samples ...
> -- 
> Christian Mallwitz INTERSHOP Communications Germany
> Senior Software Engineer    phone: +49 3641 894 334

Mime
View raw message