I tried to convert a file from Big5 to UTF8 using the iconv command. I am getting the error : illegal input sequence at position 18876
iconv -f BIG5 -t UTF8 doc_full_list.csv > doc_full_list.csv.out
When I used Apache Nifi 'ConvertCharacterSet' processor, it could successfully convert the same file.
It basically fixes the errors as below:
final CharsetDecoder decoder = inputCharset.newDecoder();
decoder.onMalformedInput(CodingErrorAction.REPLACE);
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
decoder.replaceWith("?");
Would it be possible to achieve the conversion from unix command line without using any tool ?