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); } }
public static FFXIIITextEncoding CreateEuro() { FFXIIICodePage codepage = FFXIIICodePageHelper.CreateEuro(); return(new FFXIIITextEncoding(codepage)); }
public FFXIIITextEncoding(FFXIIICodePage codepage) { Codepage = codepage; _encoder = new FFXIIITextEncoder(codepage); _decoder = new FFXIIITextDecoder(codepage); }