开发者

System.Xml.XmlException occurred. Name cannot begin with the 'G' character, hexadecimal value 0xFF27. Line 44, position 4

I have written a code to read an xml file which contains Japanese characters. Code written to read the xml file is:

        DataSet xmlData = new DataSet();            
        xmlData.ReadXml("c:\\abc.xml");

But while executing this code an exception 'System.Xml.XmlException' is occurring since the xml file contains an English character 'G' Line 44.

the Error m开发者_运维知识库essage shown is: ="Name cannot begin with the 'G' character, hexadecimal value 0xFF27. Line 44, position 4."

How can I solve this.?? My xml file details including encoding description are given below.

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

Thanks in Advance, Bijoy.


That's a FULLWIDTH LATIN CAPITAL LETTER G, not a normal letter.

Replace it with a normal G.


0xFF27 is full-width Latin letter 'G', which is not the same as Latin letter 'G'. You should use latin letters (in ASCII range) instead of full-width letters (in range FF01-FF5E). If XML is not too large the just use english keyboard and replace all letters, one by one.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜