Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Problems With Character Encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problems With Character Encoding" Watch "Problems With Character Encoding" New topic
Author

Problems With Character Encoding

William A White
Ranch Hand

Joined: Jul 01, 2004
Posts: 35
I have an application that reads in an XML document, inserts some dynamic content, and outputs it as a PDF using the UJAC utilities.

This works perfectly on a Windows server, but on a Linux machine it replaces all the French characters with symbols.

I get the same issue when reading text files from the server into strings, but I solved that by specifying the charset when creating the string. I know that there must be a better solution and that some setting on the server or in Tomcat/Catalina must be causing my problem, but I have no idea where to look!

I know enough to check the locale of the server - I get en_US.UTF-8 which seems right. Similarly, calling System.getProperty("file.encoding") returns UTF-8.

I know the problem occurs before UJAC, as the echoed content of the XML has the symbols rather than French characters.

I didn't write the code that actually gets the file contents. It uses a RequestDispatcher to read in a JSP that contains the XML with the JSP tags. Changing that is probably not an option.
 
jQuery in Action, 2nd edition
 
subject: Problems With Character Encoding
 
Similar Threads
String encoding problem
XML -> SAX -> MYSQL conversion losing character encoding...
Calling a webservice manually
Need Help regarding Internationalization in JSF
struts with character encoding problem