wood burning stoves 2.0*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "utf-8 with tomcat 5" Watch "utf-8 with tomcat 5" New topic

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:

& #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:


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
It is sorta covered in the JavaRanch Style Guide.
subject: utf-8 with tomcat 5
Similar Threads
HttpUrlConnection - cXML PunchOutSetupRequest
Help!!! Trying to Run Simple Servlet Example.....
parsing data and storing in the xml
file downloading concept