分页: 1 / 1

U盘中文名乱码处理

发表于 : 2005-04-07 15:10
oneleaf
如果local为zh_CN.UTF-8是没有任何中文问题的,如果local为其它例如为zh_CN/zh_CN.GBK则有两种办法,请依照情况选择一种方法处理:

一:修改local为zh_CN.UTF-8

设置本地local环境:

$sudo dpkg-reconfigure locales

确保 zh_CN.UTF-8 被选择,同时也默认local为 zh_CN.UTF-8

二:修改/usr/share/hal/fdi/95userpolicy/storage-policy.fdi 文件为以下内容:

<?xml version="1.0" encoding="ISO-8859-1"?> <!– -*- SGML -*- –>

<deviceinfo version="0.2">
<device>
<match key="@block.storage_device:storage.removable" bool="true">
<merge key="volume.policy.mount_option.fmask=111" type="bool">true</merge>
<merge key="volume.policy.mount_option.dmask=0" type="bool">true</merge>
<merge key="volume.policy.mount_option.users" type="bool">true</merge>
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<merge key="volume.policy.mount_option.fmask=111" type="bool">true</merge>
<merge key="volume.policy.mount_option.dmask=0" type="bool">true</merge>
<merge key="volume.policy.mount_option.users" type="bool">true</merge>
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
</device>
</deviceinfo>

发表于 : 2005-04-07 22:57
freeflying
[yuan@jackycom ~/Desktop]$ cat /usr/share/hal/fdi/95userpolicy/storage-policy.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!– -*- SGML -*- –>

<deviceinfo version="0.2">
<device>
<match key="@block.storage_device:storage.removable" bool="true">
<merge key="volume.policy.mount_option.fmask=111" type="bool">true</merge>
<merge key="volume.policy.mount_option.dmask=0" type="bool">true</merge>
<merge key="volume.policy.mount_option.users" type="bool">true</merge>
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<merge key="volume.policy.mount_option.fmask=111" type="bool">true</merge>
<merge key="volume.policy.mount_option.dmask=0" type="bool">true</merge>
<merge key="volume.policy.mount_option.users" type="bool">true</merge>
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
</device>
</deviceinfo>

发表于 : 2005-04-09 14:42
oneleaf
多谢指教,已经修正

最简单方法

发表于 : 2005-04-09 18:10
TubuX
在/etc/fstab中加上下面的内容:
/dev/sda1 /media/usb auto rw,user,noauto,utf8 0 0
可以非常好的支持中文文件名显示,可以采用同样的方法挂载winnt/win32分区。