LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: 高原之狼

有关中文文件名的 kernel patch

[复制链接]
发表于 2003-6-7 14:23:59 | 显示全部楼层

reply

i have tested your patch and:
1-> it seems useless in my system, i do as you said but nothing better happened.
2-> !!VIM!! i noticed that the vfat also have "utf8" option available, that is to say, if your system is windows2000 or XP, you'd better mount your partition with "utf8" no matter what type it is(ntfs or vfat).
 楼主| 发表于 2003-6-7 15:07:48 | 显示全部楼层
This is weird, it worked for me.

Let me explain what the patch do:
With the vanilla kernel, you can mount NTFS partition with option iocharset=cp936, however some Chinese filenames are not coverted correctly.  For example, the character ``gold'' won't be recongnized, if that file is in you current directory, a ``ls'' will give a error message like ``ls: file ``gold'' doesn't exist.''.

After applying this patch, the command ``ls'' will work as expected -- list the file ``gold''.  However, you still need a correct encoding and appropriate fonts to see the Chinese characters (zh_CN.GB2312, for example).

Would you please specify your problem?  Did you compile CP936 support into kernel or as a module?  (If as a module, you need to replace the module file nls_cp936.o. In Debian it is at /lib/modules/<kernel-version>/kernel/fs/nls/, not sure about slackware.)  Then you may need to remount your NTFS partition.
 楼主| 发表于 2003-6-7 15:10:38 | 显示全部楼层
As for your idea of mounting vfat partitions as UTF8, it is a good idea, and is worth trying.  I'll look into it when I have time.
发表于 2003-6-7 15:37:40 | 显示全部楼层
1-> no problem in compiling kernel, i compile the cp936 INTO the kernel(not module), restart the computer with the new kernel, mount ntfs with cp936---nothing better hppened, as i said before.
2-> i know the ntfs could be mount as cp936, but if you do like this, chinese filenames/dirs will not be displayed correctly, at least in my nautilus(nautilus replaces the filename/dir with "invalid Unicode"), but mount as utf8(no matter ntfs or vfat) will be ok.
发表于 2003-6-7 15:40:27 | 显示全部楼层
the problem is what coding your filesystem is, i said, in windows2000/XP the default is Unicode(utf8), so any chinese filename/dir is stored as Unicode.
 楼主| 发表于 2003-6-7 16:16:44 | 显示全部楼层
Hmm.  I compiled my nls_cp936 as module, and I am not familar with Nautilus, so really not sure what the problem is.

Thanks for testing anyway.
发表于 2003-6-7 17:55:05 | 显示全部楼层
you are welcome
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表