星期五 2004年07月02日
This blogs not support Chinese Character????
When in edit mode, The Chinese character can be displayed OK. But in view
mode, The title is OK, but when click and enter, the content is not right.
Just as Frederic Jean said, When i set the utf-8 encoding of my browser,
the content display OK! But This is not convenient for most Chinese
people because there default character encoding is GBK.
Now found it can be se by myself at the header part of setting.
Thanks for Frederic Jean.
七月 02, 2004 04:09 下午 GMT+08:00
Permalink
ZipInputStream不能正确处理中文文件名
java的java.uti.zip包中,对中文文件名的处理都是按照Unicode的方式去处理的
它内部在取ZipInputStream.getNextEntry()时是调用的getUTF8String()取文件名。
因此如果压缩包中的文件名是非unicode编码的,则不可避免的回抛出异常
IllegalArgumentException
而就目前所知:
winRAR、winzip等压缩软件都是将中文文件名按照GBK进行的编码,因此会出现这样的错误。
说来也有趣,本来这里写的就是java.util.zip关于中文的的问题,结果它自己也是有中文的问题。
归根到底还是unicode没有成为大家通用的缺省的字符集。
昨天不用utf-8的encoding,还是乱码,今天就好了。
在今天的header中有如下:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
最后发现,是在自己的settings中,可以自己修改各个header、footer、css等,只需在header中将utf-8设置好即可。
应cytihuntor要求,把我的理解描述一下,也不知是否正确:
在Setting->Themms先设置自己的theme.
然后在Pages中分别选择_header和Weblog,看起header中有无以下类似的,没有则自己添加:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
七月 02, 2004 03:32 下午 GMT+08:00
Permalink