This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problems With Character Encoding" Watch "Problems With Character Encoding" New topic

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.
I agree. Here's the link:
subject: Problems With Character Encoding
Similar Threads
Need Help regarding Internationalization in JSF
struts with character encoding problem
Calling a webservice manually
String encoding problem
XML -> SAX -> MYSQL conversion losing character encoding...