Closed golangfan closed 10 years ago
Does your iconv command accept "GB-18030" on the command line? Mine certainly does not:
$ echo "" | iconv -f GB-18030 -t utf-8
iconv: conversion from `GB-18030' is not supported
Try `iconv --help' or `iconv --usage' for more information.
Since I'm not doing any massaging of the string inputs before giving them to iconv functions, it's expected it would give the error. iconv does not consider that a valid alias.
Thank you ~
I get the "GB-18030" from github.com/saintfish/chardet this package .
GB2312//IGNORE
-> GB2312
content, err := iconv.ConvertString(string(body), "GB-18030", "UTF-8")
When i set GB-18030 i got a "invalid argument" error ?
I change the value "GB18030" is ok