Registry / utility / qiniu-iconv

qiniu-iconv

JSON →
library1.2.0gogounverified

Package iconv provides Go bindings to libiconv for converting strings between character encodings.

go get github.com/qiniu/iconv
INSTALL
IMPORT
SIG · QINIU-ICONV
Q
qiniu-iconv
utilitygov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

iconv
✓ github.com/qiniu/iconv

Converts a GBK-encoded byte slice to UTF-8.

package main import ( "fmt" "github.com/qiniu/iconv" ) func main() { cd, err := iconv.Open("utf-8", "gbk") if err != nil { panic(err) } defer cd.Close() result, _, _ := cd.Conv([]byte("\xc4\xe3\xba\xc3")) fmt.Println(string(result)) }
Debug
Known issues
gotchaRequires libiconv C library to be installed on the system.
fix
Install libiconv (e.g., apt-get install libiconv-hook-dev on Debian/Ubuntu) before building.
affects: all
Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
qiniu-iconv — go get qiniu-iconv · libregistry