0

I'm working on a C++ MFC project on VS 2013. I'm using TinyXML library, utf-8 encoding.

I insert non-English characters like дąć and save the file. When I try to open this XML file TinyXML tell me there is an error:

Error #9: Unable to read end tag

XML file in question:

<GSE ldInst="1" cbName="InputGoose">
  <Address>
    <P type="APPID">0001</P>
    <P type="GoCBRef">�����</P>
    <P type="DatSetRef">�����</P>
    <P type="GoID">�����</P>
    <P type="MAC-Address">01-0C-CD-01-00-01</P>
    <SWE idx="0" dev="1">
      <State>P</State>
    </SWE>
  </Address>
</GSE>

What could be the problem?

szpryc
  • 21
  • 4
  • Are you sure you are saving a valid UTF-8 file? Which editor are you using? As you can see, your pasted XML contains "?" symbols: please check the encoding of your input file with something like [Notepad++](https://notepad-plus-plus.org/download/v6.7.9.html) – Sga Jun 18 '15 at 11:17
  • Compiler Character Set : MBCS XML encoding UTF-8 notepad ++ :

    xB9xBFx9CxE6

    – szpryc Jun 18 '15 at 11:53
  • Is Notepad++ showing the non-English characters correctly? – Sga Jun 18 '15 at 12:31
  • Notepad++ showing the non-English characters incorrectly. – szpryc Jun 18 '15 at 12:37
  • So, you have to fix that to be able to parse to valid UTF-8 – Sga Jun 18 '15 at 12:40

0 Answers0