When characters are passed from one piece of software to another, the two parties have to agree what encoding is being used. If they don't agree, for example if one party thinks the data is in iso-8859-1 and the other party thinks it is in utf-8, then you get this kind of problem.
You've described a moderately complex environment in which there are quite a few software components exchanging data with each other. It's quite impossible to tell from your description where the misunderstanding has arisen. You need to follow the path of a character through the system to work out at what point it is being misinterpreted by the recipient. Quite often it's the final stage that gets it wrong: the web server sends a page in one encoding, and the browser thinks it's in a different encoding. Check whether you can make this work with simple static HTML pages served to your browser, and if that works, gradually add complexity until you find the point of failure.
The problem may have something to do with XML, but it's more likely from what you've said that it doesn't.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference