public override char[] process(int param, RTFReader reader) { char[] hex = new char[2]; hex[0] = (char)reader.read(); hex[1] = (char)reader.read(); uint value = Convert.ToUInt32(new String(hex), 16); return(new char[] { (char)value }); }
public override char[] process(int param, RTFReader reader) { if ((param < 0) && (param >= short.MinValue)) { // in this case the value has been written as a signed 16 bit number. We need to convert to an // unsigned value as negative code points are invalid. param = (short)param & 0xFFFF; } // Convert the code point to one or more characters. var characters = char.ConvertFromUtf32(param); // skip the next character. reader.read(); return(characters.ToArray()); }
public override char[] process(int param, RTFReader reader) { if ((param < 0) && (param >= short.MinValue)) { // in this case the value has been written as a signed 16 bit number. We need to convert to an // unsigned value as negative code points are invalid. param = (short)param & 0xFFFF; } // Convert the code point to one or more characters. var characters = char.ConvertFromUtf32(param); // skip the next character. reader.read(); return characters.ToArray(); }
public override char[] process(int param, RTFReader reader) { char[] hex = new char[2]; hex[0] = (char) reader.read(); hex[1] = (char) reader.read(); uint value = Convert.ToUInt32(new String(hex), 16); return new char[] { (char) value }; }