.zip创建的.zip文件不支持中文(utf-8) [英] .zip file created by Java doesn't support Chinese(utf-8)

查看:252
本文介绍了.zip创建的.zip文件不支持中文(utf-8)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Java(jdk,ant.jar或commons-compress)创建.zip文件。

I want to create a .zip file using Java(jdk, ant.jar or commons-compress).

但如果ZipEntry的名称包含非英语例如中文,日语),它将在WinRAR或Windows Compress中显示不可读代码(公共压缩在WinRAR中正确显示)。

But if the ZipEntry's name contains non-English(eg. Chinese, Japanese), it will display unreadable code in WinRAR or Windows Compress(commons-compress display correctly in WinRAR).

谁可以帮助我!!!

推荐答案

您已按下 Top 25 java bug

好消息是,这已经解决了。坏消息它只是在JDK7中修复。有关详情,请参见此条目

Good news is this is already resolved. Bad news it it is fixed only in JDK7. See this entry for details.

另一种方法,您可以使用 Arcmexer (唯读)。

Alternativlly, you can use Arcmexer (readonly).

这篇关于.zip创建的.zip文件不支持中文(utf-8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆