go/src/encoding
Thuy Linh Luu 6a675b9a7c encoding/xml: wrap charsetReader errors
This change wraps the errors from the CharsetReader function so the caller can distinguish different error conditions.

Context: I have an XML file with an unknown encoding which I like to handle separately. I like to use the CharsetReader for this but the error type has not been forwarded.

Change-Id: I6739a0dee04ec376cd20536be2806ce7f50c5213
GitHub-Last-Rev: ada9dd510f
GitHub-Pull-Request: golang/go#60199
Reviewed-on: https://go-review.googlesource.com/c/go/+/494897
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2023-05-17 16:20:09 +00:00
..
ascii85 encoding: use strings.Builder 2022-09-06 15:46:20 +00:00
asn1 encoding/asn1: improve memory efficiency of ObjectIdentifier.String 2023-03-29 18:24:36 +00:00
base32 all: remove redundant type conversion 2022-10-06 04:37:00 +00:00
base64 encoding: use strings.Builder 2022-09-06 15:46:20 +00:00
binary encoding/binary: add word size to the error message of the failed constraint 2023-04-04 22:12:53 +00:00
csv encoding/csv: update doc comment of Read method 2023-05-10 13:00:20 +00:00
gob all: fix misuses of "a" vs "an" 2023-04-04 14:20:53 +00:00
hex Revert "hex: fix panic in Decode when len(src) > 2*len(dst)" 2023-02-21 15:35:11 +00:00
json encoding/json: make use of Buffer.AvailableBuffer 2023-03-15 15:41:55 +00:00
pem all: use strings.Builder where appropriate 2022-09-29 22:56:00 +00:00
xml encoding/xml: wrap charsetReader errors 2023-05-17 16:20:09 +00:00
encoding.go