From 071ea3ca534fe90f697f96e7ce723ad5e6c7f8e0 Mon Sep 17 00:00:00 2001 From: Kai Burjack <72760888+kaiburjack@users.noreply.github.com> Date: Mon, 15 Aug 2022 18:26:41 +0200 Subject: [PATCH] Add note about supported character encodings --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1af04c9..2cccbd0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ In addition to handling namespaces, gosaxml can also canonicalize and minify XML and does not repeat the prefix-less namespace declaration on all encoded XML elements, like `encoding/xml` does. +Due to the way it is implemented right now, the byte slices it reads from a provided `io.Reader` can only be ASCII or UTF-8 encoded. UTF-16 and UTF-32 character encodings or other encodings not identical with the ASCII character set or not using multi-byte encodings where the high bit is always set, are _not_ supported. + # Get it ```shell @@ -55,4 +57,4 @@ func TestDecodeAndEncode(t *testing.T) { `Hi!`, w.String()) } -``` \ No newline at end of file +```