TiXmlElement * aaa=new TiXmlElement (" NAME ");
RootElement - & gt; LinkEndChild (aaa);
DIRElement - & gt; The SetAttribute (" STR ", "system");
Open the XML file, the system of two words are garbled, change system to other Chinese, is normal:
"?? ""
CodePudding user response:
XML encoding problem, try to GBKCodePudding user response:
How to change the other will not be in ChineseCodePudding user response:
Really don't understand why only the "system" two words will garbledCodePudding user response:
Your problem solvedCodePudding user response:
For computer no noise, only the binary bytes; To the human brain is gibberish, GBK: 0 xb0 0 xa1, Unicode - 16 LE: 0 x4a 0 x55, Unicode - 16 BE: 0 x55 0 x4a, utf-8 8-0 x95 xE5 0 0 x8aCodePudding user response:
Tinyxml supports only UTF8 encoding, you can't write Chinese directly, Chinese constants default UNICODE or ANSI, need transcoding in UTF8