Todos Novo

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Entrar

Todos Novo Entrar

All gists matching topic gbk

Mais recente criado
Menos recente criado
Mais recente atualizado
Menos recente atualizado

jetsung / gbkbig5.go

0 curtidas
0 bifurcações
1 arquivos
Última atividade 1 month ago
Golang GBK Big5 from/to UTF-8 转换 转自:https://gist.github.com/zhang0098/c691e1da5bbdc7f41ca5
big5 gbk go
1 import (
2 "bytes"
3 "io/ioutil"
4 "golang.org/x/text/encoding/traditionalchinese"
5 "golang.org/x/text/encoding/simplifiedchinese"
6 "golang.org/x/text/transform"
7 )
8 //convert GBK to UTF-8
9 func Decodegbk(s []byte) ([]byte, error) {
10 I := bytes.NewReader(s)
Próximo Anterior

Desenvolvido por Opengist ⋅ Load: 66ms⋅

Português
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ 爱开发 ⋅ 爱开发社区