public static void ToXml(FFXIIICodePage codepage, XmlElement node)
        {
            XmlElement charsNode = node.EnsureChildElement("Chars");
            XmlElement bytesNode = node.EnsureChildElement("Bytes");

            foreach (char ch in codepage.Chars)
            {
                XmlElement charNode = charsNode.CreateChildElement("Entry");
                charNode.SetChar("Char", ch);
            }

            foreach (KeyValuePair <char, short> pair in codepage.Codes)
            {
                XmlElement byteNode = bytesNode.CreateChildElement("Entry");
                byteNode.SetChar("Char", pair.Key);
                byteNode.SetInt16("Byte", pair.Value);
            }
        }
        public static void ToXml(FFXIIICodePage codepage, XmlElement node)
        {
            XmlElement charsNode = node.EnsureChildElement("Chars");
            XmlElement bytesNode = node.EnsureChildElement("Bytes");

            foreach (char ch in codepage.Chars)
            {
                XmlElement charNode = charsNode.CreateChildElement("Entry");
                charNode.SetChar("Char", ch);
            }

            foreach (KeyValuePair<char, short> pair in codepage.Codes)
            {
                XmlElement byteNode = bytesNode.CreateChildElement("Entry");
                byteNode.SetChar("Char", pair.Key);
                byteNode.SetInt16("Byte", pair.Value);
            }
        }
Exemple #3
0
        public static FFXIIITextEncoding CreateEuro()
        {
            FFXIIICodePage codepage = FFXIIICodePageHelper.CreateEuro();

            return(new FFXIIITextEncoding(codepage));
        }
Exemple #4
0
 public FFXIIITextEncoding(FFXIIICodePage codepage)
 {
     Codepage = codepage;
     _encoder = new FFXIIITextEncoder(codepage);
     _decoder = new FFXIIITextDecoder(codepage);
 }
Exemple #5
0
 public FFXIIITextEncoding(FFXIIICodePage codepage)
 {
     Codepage = codepage;
     _encoder = new FFXIIITextEncoder(codepage);
     _decoder = new FFXIIITextDecoder(codepage);
 }