Outdoordoor
Member
|
Text encoding broken when reading from file
I'm trying to read from a text file (either xml, or json) which contains text written in both latin and cyrillic letters. However, cyrillic letters, along with some special symbols, are not read correctly, and I'm getting results like this:
Test code for xml files looks like this:
Code:
XmlData xml;
if(!xml.load(UID(329369827, 1286683127, 1145043378, 2659162026)))
{
LogConsole(true); Log("Failed to load file");
}
REPA(xml.nodes)
{
LogConsole(true); Log(S+xml.nodes[i].name+" "+xml.nodes[i].findParam("en").asText()+'\n');
}
What can I do to fix this? I've already tried using many different file encodings. Also this is not just an issue with the terminal output, the same happens when I try drawing text on screen.
|
|
02-15-2024 07:12 AM |
|
Esenthel
Administrator
|
RE: Text encoding broken when reading from file
|
|
02-15-2024 09:16 AM |
|
Outdoordoor
Member
|
RE: Text encoding broken when reading from file
Seems like it helped, thank you!
|
|
02-15-2024 10:39 AM |
|