Strange xml/html accent issue

Posted by Ayrad on Stack Overflow See other posts from Stack Overflow or by Ayrad
Published on 2010-03-30T18:22:49Z Indexed on 2010/03/30 18:53 UTC
Read the original article Hit count: 558

Filed under:
|
|
|
|

I have an XML file that contains a message with html tags in it. The XML file is read by a java class that mails it to people. When the mail is received, the accents do not show. For example é doesn't show.

I have tried é in the xml but it gives an error in eclipse saying that the entity has not been declared.

I also tried simply inserting é but that shows nothing in the final output.

The 3rd thing I tried was using <![CDATA[é]]> but that broke the parser since it didn't output anything after it.

However I noticed something weird. When i put something like this in the xml and added UTF-16 encoding

<message>text bla bla blaa é&lt; 

it did ouput the é at the end like this bla bla blaa blaa é.

EDIT <message>text bla bla blaa éé&lt; outputs ?é or just one é

The file looks something like this:

<?xml version="1.0"? encoding="UTF-16">

<message>
&lt;b&gt;hello é &lt;/b&gt;
</message>
</xml>

What gives?

© Stack Overflow or respective owner

Related posts about html

Related posts about Xml