encoding/japanese: document that decoding follows RFC 2237, not WHATWG Change-Id: I5028445a75bc87dd01b4130d0541bac06a6a6964 Reviewed-on: https://go-review.googlesource.com/c/text/+/813480 Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/encoding/japanese/iso2022jp.go b/encoding/japanese/iso2022jp.go index 6f7bd46..10fbd86 100644 --- a/encoding/japanese/iso2022jp.go +++ b/encoding/japanese/iso2022jp.go
@@ -14,6 +14,16 @@ ) // ISO2022JP is the ISO-2022-JP encoding. +// +// Decoding accepts ISO-2022-JP as specified in RFC 2237, +// which includes support for inputs which are not supported by +// the intentionally more restrictive WHATWG Encoding Standard, +// such as JIS X 0212 and half-width Katakana characters. +// +// Encoding always produces output that is valid according to WHATWG. +// +// Programs which forward inputs after parsing should take care to +// re-encode the parsed input for forwarding. var ISO2022JP encoding.Encoding = &iso2022JP var iso2022JP = internal.Encoding{