support gbk encoding
This commit is contained in:
parent
ce4e42da32
commit
35becabf3c
@ -8,6 +8,7 @@ package sql
|
|||||||
import (
|
import (
|
||||||
"golang.org/x/text/encoding"
|
"golang.org/x/text/encoding"
|
||||||
"golang.org/x/text/encoding/charmap"
|
"golang.org/x/text/encoding/charmap"
|
||||||
|
"golang.org/x/text/encoding/simplifiedchinese"
|
||||||
)
|
)
|
||||||
|
|
||||||
type charsetEncoding map[string]encoding.Encoding
|
type charsetEncoding map[string]encoding.Encoding
|
||||||
@ -18,4 +19,5 @@ func init() {
|
|||||||
charsetEncodingMap = make(map[string]encoding.Encoding)
|
charsetEncodingMap = make(map[string]encoding.Encoding)
|
||||||
// Begin mappings
|
// Begin mappings
|
||||||
charsetEncodingMap["latin1"] = charmap.Windows1252
|
charsetEncodingMap["latin1"] = charmap.Windows1252
|
||||||
|
charsetEncodingMap["gbk"] = simplifiedchinese.GBK
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user