“iconv“ is used to convert text from one character encoding to another. When doing this, you may get the “illegal input sequence at position …” error which makes the translation fail. In this case, you can run the following command with the “-sc” options to ignore the illegal characters and go on:
1 | iconv -f gb2312 -t utf-8 -sc some.txt |
The “-s” option silences warnings, and the “-c” option omits invalid characters from output.
From “here“.