开发者

Why do Excel and IE8 give an error when viewing XML with an ë in it?

开发者 https://www.devze.com 2022-12-13 12:36 出处:网络
Maybe this is an encoding issue? I can\'t imagine that you have to replace every non standard character.

Maybe this is an encoding issue? I can't imagine that you have to replace every non standard character.

Example XML:

<?xml version="1.0" encodin开发者_JAVA百科g="utf-8"?>
<client>
      <achternaam>Erriëns</achternaam>                                 
</client>

With or without the first line doesn't matter.

Error in IE8:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 
--------------------------------------------------------------------------------
An invalid character was found in text content. Error processing resource 'file:///C:/Users/******/SO.xml'. Line ...

      <achternaam>Erri

Excel doesn't like the ë either.


That's because you haven't actually saved the file as UTF-8. The header says UTF-8, but the actual encoding of the file is something different.

In notepad choose the Save As option, then select UTF-8 as encoding.

0

精彩评论

暂无评论...
验证码 换一张
取 消