我尝试使用iconv命令将文件从Big5转换为UTF8。我收到错误:illegal input sequence at position 18876
iconv -f BIG5 -t UTF8 doc_full_list.csv > doc_full_list.csv.out
当我使用Apache Nifi“ConvertCharacterSet”处理器时,它可以成功转换同一个文件。
它基本上修复了以下错误:
final CharsetDecoder decoder = inputCharset.newDecoder();
decoder.onMalformedInput(CodingErrorAction.REPLACE);
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
decoder.replaceWith("?");
是否可以在不使用任何工具的情况下从unix命令行实现转换?