We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ go get github.com/skip2/go-qrcode/qrcode $ qrcode "中文測試" > out.png; ./grcode out.png Data 中文測試 $ qrcode "香蕉人" > out.png; ./grcode out.png Data 鬥呵負莠コ
The text was updated successfully, but these errors were encountered:
香蕉人??
Sorry, something went wrong.
for chinese string, may need iconv.
中文需要用iconv转换下
// ScanQRcode scan qrcode(in fact, any one of zbar bar codes) func ScanQRcode(path string) ([]string, error) { qrcodes := []string{} results, err := grcode.GetDataFromFile(path) if err != nil { return qrcodes, err } for _, result := range results { cd, err := iconv.Open("shift_jis", "utf-8") if err == nil { defer cd.Close() result1 := cd.ConvString(result) qrcodes = append(qrcodes, result1) } else { return qrcodes, err } } return qrcodes, nil }
@clsung
我更新库后好像不需要再转码了,直接输出正常
No branches or pull requests
$ go get github.com/skip2/go-qrcode/qrcode
$ qrcode "中文測試" > out.png; ./grcode out.png
Data 中文測試
$ qrcode "香蕉人" > out.png; ./grcode out.png
Data 鬥呵負莠コ
The text was updated successfully, but these errors were encountered: