go-message: Reintroduce support for CP125x encodings v1 APPLIED

Ben Burwell: 1
 Reintroduce support for CP125x encodings

 1 files changed, 3 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/9461/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH go-message] Reintroduce support for CP125x encodings Export this patch

In 8eb6e2ed7b8187262b58a08370926a59369346ef, charset handling was
refactored to make use of the ianaindex package. A number of charsets
present in the ianaindex package were removed from being explicitly
mentioned in go-message, leaving only a "quirks table." While nearly all
of the removed charsets are handled by the ianaindex package, support
for three charsets which were previously handled by go-message was
dropped: cp1250, cp1251, and cp1252.
Was this intentional? Guessing not since the commit didn't mention it. I
double checked all of the other encodings which were removed in that
commit, these are the only three that are not handled by ianaindex.
 charset/charset.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/charset/charset.go b/charset/charset.go
index f08775e..aeda839 100644
--- a/charset/charset.go
+++ b/charset/charset.go
@@ -35,6 +35,9 @@ var charsets = map[string]encoding.Encoding{

	"ansi_x3.110-1983": charmap.ISO8859_1,     // see RFC 1345 page 62, mostly superset of ISO 8859-1
	"gb2312":           simplifiedchinese.GBK, // GBK is a superset of HZGB2312
	"cp1250":           charmap.Windows1250,
	"cp1251":           charmap.Windows1251,
	"cp1252":           charmap.Windows1252,

func init() {