Skip to content
New issue

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

invalid argument #12

Closed
golangfan opened this issue Feb 24, 2014 · 3 comments
Closed

invalid argument #12

golangfan opened this issue Feb 24, 2014 · 3 comments

Comments

@golangfan
Copy link

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

@djimenez
Copy link
Owner

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.

@golangfan
Copy link
Author

Thank you ~

I get the "GB-18030" from github.com/saintfish/chardet this package .

@lnnt
Copy link

lnnt commented Apr 14, 2023

GB2312//IGNORE -> GB2312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants