aspose file tools*
The moose likes Tomcat and the fly likes utf-8 with tomcat 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "utf-8 with tomcat 5" Watch "utf-8 with tomcat 5" New topic
Author

utf-8 with tomcat 5

Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
hey folks,

to show you what is it all about i wrote a small app which shows the
html utf-8 codes of the entered string. this is the jsp code:


well, as you see, this code block gets a utf-8 encoded parameter from
a request, outputs its length, the parameter itself, and its html
utf-8 codes.
to test it i send a hebrew letter ALEF. on tomcat 4.xx everything
works perfect and i get the following response:

7
א
& #1488;

(in case you don't see it here, it's 7 , alef's utf-8 code and alef's utf-8
code parsed to be visible in browser)

cool. then i run the same code on tomcat 5.0.16 and KABOOM. this is
what i get:

1
?
?

where the hell utf-8 is gone?

all this makes me understand that tomcat 5 has some bug influenting
its utf-8 support.
deeply in the heart i hope you've already met this early and has a
good solution, because i don't!

[ July 02, 2004: Message edited by: Asher Tarnopolski ]
[ July 03, 2004: Message edited by: Asher Tarnopolski ]

Asher Tarnopolski
SCJP,SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: utf-8 with tomcat 5