You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yiannis Mavroukakis <yi...@jaguarfreight.com> on 2004/03/11 10:45:17 UTC

i18n problems

I'm acting as a middleman delivering this email for a friend who has trouble
contacting the list ;)


====================================================
I am using TC 5.0.16.

 I once had problems when reading intl. form data and passing them thru
servlets to a database. That was solved by just using

 request.setCharacterEncoding("iso-8859-7");

Now the problem is opposite. I read strings from a database and as soon as
they become http data, their encoding is lost, resulting in ???'s instead of
text. Servlets do contain

res.setContentType("text/html; charset=iso-8859-7");
req.setCharacterEncoding("iso-8859-7");

and I have tried with UTF-8 as well, with same results. There is nothing
wrong with the database and the strings, as other applications work fine. To
make sure that I get correct strings from the db, I also print them to a
JTextArea (as soon as they are retrieved) and they have no problem.

So it's not a database, font, browser problem. Encoding is lost somewhere
inside TC and I don't know what to do... Any ideas welcome.

TIA


==================================================


Kostas Harvatis
-----
National Center for Social Research - Directorate of Research Support
www.ekke.gr


Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.

RE: i18n problems

Posted by Yansheng Lin <ya...@silvacom.com>.
Hi middleman:), can you ask your friend to do one thing first(I would do this
myself, but I am having trouble with my oracle jdbc driver:(. 

That is, native2ascii a test strings and insert it to the database.  I bet
that's why he is seeing the ???'s instead of the text. 

-yan

-----Original Message-----
From: Yiannis Mavroukakis [mailto:yiannis@jaguarfreight.com] 
Sent: Thursday, March 11, 2004 2:45 AM
To: 'Tomcat Users List'
Subject: i18n problems


I'm acting as a middleman delivering this email for a friend who has trouble
contacting the list ;)


====================================================
I am using TC 5.0.16.

 I once had problems when reading intl. form data and passing them thru
servlets to a database. That was solved by just using

 request.setCharacterEncoding("iso-8859-7");

Now the problem is opposite. I read strings from a database and as soon as
they become http data, their encoding is lost, resulting in ???'s instead of
text. Servlets do contain

res.setContentType("text/html; charset=iso-8859-7");
req.setCharacterEncoding("iso-8859-7");

and I have tried with UTF-8 as well, with same results. There is nothing
wrong with the database and the strings, as other applications work fine. To
make sure that I get correct strings from the db, I also print them to a
JTextArea (as soon as they are retrieved) and they have no problem.

So it's not a database, font, browser problem. Encoding is lost somewhere
inside TC and I don't know what to do... Any ideas welcome.

TIA


==================================================


Kostas Harvatis
-----
National Center for Social Research - Directorate of Research Support
www.ekke.gr


Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org