public void EncodeStringBasicTest() { var result = _charset.EncodeString("Test", 4); var expected = new byte[] { 0x93, 0xA4, 0xB2, 0xB3 }; Assert.Equal(expected, result); }
public void WriteString(string s, int length, ICharset charset) { var data = charset.EncodeString(s, length); for (var i = 0; i < length; i++) { Writer.Write(data[i]); } }