Hans Wichman wrote:

Hi,
I have a strange problem, I wrote a servlet that retrieves some data from a database, which may contains characters such as �.


On my local tomcat 4.1.24 testserver the output shows correctly as in 'a�robe'.
However if I deploy the application to one of our testservers, the result is 'a?robe'.


Does anybody have a clue how this may happen?

regards,
Hans


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

It is almost certainly a characterset problem. You can specify the characterset when you set the content type, and Tomcat will create an OutputStreamWriter ( to create the PrintWriter ) with that characterset. Or if you are creating the PrintWriter yourself, specify the correct encoding.
Another thing to check is the characterset in your database. You want to make sure this matches.


Hope this helps.
Mark


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to