public void DecodeStringBasicTest() { var encoded = new byte[] { 0x93, 0xA4, 0xB2, 0xB3 }; var expected = "Test"; var result = _charset.DecodeString(encoded); Assert.Equal(expected, result); }
public string ReadString(int length, ICharset charset) { var data = new byte[length]; for (var i = 0; i < length; i++) { data[i] = Reader.ReadByte(); } return(charset.DecodeString(data)); }