use built in encoding handling

This commit is contained in:
Eliot Jones
2023-06-04 16:49:37 +01:00
parent 6f59bed9a2
commit 81bb6fce83

View File

@@ -64,6 +64,9 @@
case HexToken hex:
documentIdBytes = hex.Bytes.ToArray();
break;
case StringToken str:
documentIdBytes = str.GetBytes();
break;
default:
documentIdBytes = OtherEncodings.StringAsLatin1Bytes(token.Data);
break;