How to unzip file that that is not in UTF8 format in java

前端 未结 5 596
臣服心动
臣服心动 2020-12-10 19:24

I have a file e.g. test.zip. If I use a ZIP-tool like winrar, it\'s easy to extract (unzip test.zip to test.csv). But test.csv is not in UTF8 format. My problem here is, whe

5条回答
  •  Happy的楠姐
    2020-12-10 19:44

    As i remember this only happen when the file name is not encoded in UTF8.

    If 3rd Component is not forbidden,try Apache Zip API.

    import org.apache.tools.zip.ZipEntry; import org.apache.tools.zip.ZipFile;

提交回复
热议问题