Hi Jose,
I had similar problem with Tomcat, MySQL and ISO-8859-2 encoding.
I had to do 2 things to solve that problem:
1) set correct database encoding (MySQL doesn't support UTF yet)
That was easy to find.
2) correctly decode characters sent by the browser
The problem is that most browsers encode characters using
encoding that you specify in the page (for example using META
tag), but they do not send info what encoding was used
when sending that encoded data to the server.
If that information is not provided - server uses default
encoding, which is ISO-8859-1.
And at this point your struts forms may contain messed data.
To give the server some hint what encoding to use - try to use
filters. Look at :
SetCharacterEncodingFilter
that comes with Tomcat examples (examples/web-inf/classes/filters)
Very easy to use or extend to your needs.
It only checks if characterEncoding was set, and if not - it sets
the default encoding specified in the configuration.
That solved my problem.
Dariusz Wojtas
Wednesday, July 10, 2002, 6:00:21 PM, you wrote:
JCRR> My application Server is Jakarta Tomcat and I 'm working with Linux
JCRR> Mandrake 8.2.
JCRR> My DB is PostgreSQL.
JCRR> Rajesh Kalluri wrote:
>>Jose,
>>
>>What is your application Server and what Platform are you work with
>>(Solaris/Linux/Windows).
>>
>>Its most probably not setting up correctly with NLS_LANG settings in the
>>profile of the user you web server/app server is running as.
>>
>>Also if you are running Oracle as ur db make sure you have nls_charset12.jar
>>in your webserver classpath.
>>
>>hth
>>
>>Rajesh
>>
>>-----Original Message-----
>>From: Jose Carlos Rubia Raya [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, July 10, 2002 6:15 AM
>>To: [EMAIL PROTECTED]
>>Subject: JDBC charset problem
>>
>>
>>Hello
>>
>>I have a little program.
>>In some forms I introduce words like "d'enginyeria en inform�tica" and I
>>store this words in my DB.
>>After, when I retrieve this words from the DB to show them in a form the
>>words appear like "d?enginyeria en inform?tica".
>>
>>How can I configure my JDBC to resolve this problem???
>>
>>Thanks
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>>
>>--
>>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
JCRR> --
JCRR> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
JCRR> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
Best regards,
Dariusz Wojtas mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>