From 35becabf3cb94479f47f46a9cb9a2ff852d24803 Mon Sep 17 00:00:00 2001 From: ceshihao Date: Mon, 8 Jan 2018 18:25:33 +0800 Subject: [PATCH] support gbk encoding --- go/sql/encoding.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/sql/encoding.go b/go/sql/encoding.go index ac38f85..767bd9d 100644 --- a/go/sql/encoding.go +++ b/go/sql/encoding.go @@ -8,6 +8,7 @@ package sql import ( "golang.org/x/text/encoding" "golang.org/x/text/encoding/charmap" + "golang.org/x/text/encoding/simplifiedchinese" ) type charsetEncoding map[string]encoding.Encoding @@ -18,4 +19,5 @@ func init() { charsetEncodingMap = make(map[string]encoding.Encoding) // Begin mappings charsetEncodingMap["latin1"] = charmap.Windows1252 + charsetEncodingMap["gbk"] = simplifiedchinese.GBK }