Forum > General
XMLWriter/reader and chinese characters
scribly:
First off: I'm using ansi strings throughout my app. (It's not an option to convert it completly to unicode)
Now the thing, when a chinese user uses chinese characters in a string it's displayed and handled properly by the rest of the gui. TCanvas.textout shows the correct chinese characters and can be edited again in a editbox without any problems.
The problem occurs when the data is being saved to an XML file and then read back using (xmlread/xmlwrite)
The chinese user sees question mark signs when he loads the file back
Weird thing is that when I (English/us) copy/paste the chinese characters from a website and then paste them into my app, and save, it will get loaded back properly.
Anyone knows what is going on here or how to fix this? Setting an explicit encoding ? Temporarily convert the string to unicode and save that?
I use TDOMNode.Textcontent to access the text in the fields
typo:
Have you tried a TIniFile?
scribly:
No, I need the tree-support xml provides
entry can contain 1 or more entries of the same kind, which again can have multiple entries as well, etc... (And part of it is filling a treeview)
(Cheat Engine 6 cheat table)
typo:
Example directory has a xmlreader example with a TreeView. Have you tested it with chinese characters?
scribly:
No, but the thing is that I can not test it myself.
When I copy/paste Chinese characters (I don't have a Chinese keyboard) it works fine
But when a real Chinese person types in the characters and then saves that and loads it back it just comes out as question marks
So it's pretty impossible for me to find out what's going wrong.
I'll give that xmlreader version to my tester and see what happens
Navigation
[0] Message Index
[#] Next page