I have an C# application where I am storing the code point value of a Unicode character to be displayed when the user correctly matches a normal specific string.
The thing is that when I am storing the code point value directly (say, \uFB80) the application works fine. But when I am reading from a file or a variable that has the code point only (in this case FB80), I get a lot of wrongly rendered characters. Changing the stored value to \uFB80 or trying to add a "\u" in front of the value both results in the system reading it as \uFB80 which ends up having another wrong result.
What is the way around this?
XmlTextReader reader = new XmlTextReader("file.xml");
reader.Read();
reader.MoveToAttribute("glyph");
glyph = reader.Value;
// glyph will be "FB80"
// if xml file had "\uFB80", glyph will be "\\uFB80"
richTextBox1.SelectionFont = "QCF_P604";
richTextBox1.AppendText(glyph);