tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laukó Péter <pla...@freemail.hu>
Subject character encoding problem
Date Thu, 22 Aug 2002 22:34:04 GMT

Hi List,
I'm having problems about character encoding (latin2).
I receive string data from PostgreSQL tables and when I put them on my jsp pages some characters
are converted to "?"-s. It happens with letters "ő" and "ű".
The data in the db is correct.
I set the character encoding in the pages by:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
and all characters I write _dirctly_ in the pages are displayed correctly.
I set the locale in the tomcat startup script by "export LANG=hu_HU" and checking Locale.getDefault()
gives the correct answer (huHU), but has no effect.
The only solution I have found so far is this:
<%=new String( journal.getName().getBytes("ISO-8859-2"), "ISO-8859-1")%>
This results in the correct display but means I have to escape _all_ outputs by hand.
There must be an easier solution. Please help!
thanks in advance, Peter



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


Mime
View raw message