go第三方库-cs.opensource.google.go.x.text
Contents
用于文本处理的补充 Go 库,其中许多涉及 Unicode
默认go读写文件都是按照utf-8的,且标准库不提供修改编码方式的api(不同于pthon可以在使用open函数打开文件的时候直接指定encoding),这个库提供了修改读写文件编码的api
常见用法
|
|
对于标准库的io.Reader或者io.Writer(包括bufio里面的),我们都可以添加一个transform的Reader或者Writer来改变读写编码