csv - 如何在 Golang 中解码 UTF-16BE CSV 文件

标签 csv go decode utf-16

我正在尝试在 Golang 中解码以 UTF-16BE 编码的 CSV 文件。我必须为新阅读器调用的 charmap ISO 字符号是多少?

我要调用

csv.NewReader(charmap.XXXX.NewDecoder().Reader(file))

XXXX 的值应该是多少?

最佳答案

你试过吗?

https://godoc.org/golang.org/x/text/encoding/unicode#UTF16

unicode.UTF16(BigEndian, UseBOM)

关于csv - 如何在 Golang 中解码 UTF-16BE CSV 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54098257/

相关文章:

image - 在 Golang 中画一个矩形?

ffmpeg - H264 : decode series of nal units with ffmpeg

python - Unicode解码错误: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte

python-3.x - 值错误: could not convert string to float: left_column_pixel

sql-server - 批量加载数据转换错误 - 找不到答案

r - 使用 formatC 将 0 添加到 arg 中的序列中,在 R 中返回错误

python - 修补 Python 中 CSV 文件中缺失的行

戈朗 : what is atomic read used for?

unit-testing - 表驱动测试的子集

java - 如何解码ASN1字节以提取信息?