Question

IE doesn't like the å character in an XML file to display. Is that an IE problem or are å and alike chars indeed invalid XML and do i have to create the &#xxx; values for all these letters?

Michel

by the way: the chars are inside a CDATA tag

The declaration is this: hmm, can't seem to get the xml declaration pasted in my post, it gets deleted or hidden in the html of my post i think, tried the backtick, 4 spaces etc to mark it as code. However, it's the same as sais in the answers

The declaration is this:

<?xml version="1.0" encoding="utf-8"?>

The snippet is

<resource key="erroraspx-errorDescription" value="cdata">  
<![CDATA[Något gick fel. Klicka <a href=".">här</a> för att gå till webbsidan ]]>  
</resource>  
Was it helpful?

Solution

I am pretty sure that this is an encoding problem. You need to check that the encoding of your file is indeed something internationalised, like UTF-8, and that the xml header indicates this.

The xml file should start with <?xml version="1.0" encoding="UTF-8"?>

OTHER TIPS

I would think that would depend on the character set/encoding you had defined for the XML file.

My guess is that your text in encoded in ISO-8859-1 since that is commonly used in Sweden.

Try adding:

<?xml version='1.0' encoding='ISO-8859-1'?>

I would consider converting the text to UTF-8.

You allways can use entities as this:

<test>
&#228;
&#252;
&#229;
</test>

to get:

<test>
ä
ü
å
</test>

Maybe not exactly what you want, but a nice workaround. You can use sites like utf8-chartable.de to look up the needed value.

This is an encoding issue. If the encoding of the file is provided in the xml, it should be recognized correctly. If your file is latin1, for example, the xml must start with this line:

<?xml version="1.0" encoding="ISO-8859-1"?>

You can omit the encoding attribute, determining the default encoding of the xml can be a bit tricky, though.

Make sure that you actually save the file using the encoding that is specified in the XML.

The Notepad for example by default saves files as ANSI rather than UTF-8. Use the "Save As..." option so that you can specify the encoding.

I saved your XML as an UTF-8 file, and that shows up just fine in IE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top