|
How to let hal mount DOS/Win partition with UTF8?
I have this problem for quite a while, but never sought any serious and thorough solution yet. UTF8 is a really good thing because it enable people to use any languages at the same time, esp. when transfering UTF8-named files using USB pen/key drives which usually use FAT/VFAT file system. And also NTFS uses unicode to record file names. So it is critical to have UTF8 support for DOS/Win file systems. My old way is to recompile kernel and explicitly speicify UTF8 as the charset for DOS/Win file systems. However I know that hal (hardware abstract layer) included in FC is used to determine how to mount a hot-plugged drive. So I tried to write a policy file to let hal mount DOS/Win file system using UTF8 (see the following), but my trial was only a half success: after hal auto-mounted to a USB drive, I can see the files and directories in other languages, esp. three Asian languages (they are double-byte coded). However when I clicked such a directory folder, the nautilus file manager was frozen. I guess that hal doesn't like my policies.
Here is my volume-policy-utf8.fdi modified from the original /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi included in hal-0.5.2-2 (I only want to change the mount option for DOS/Win file systems, not others):
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="volume.partition.msdos_part_table_type" exists="true">
<!-- Mount all MSDOS and Windows partitions with UTF-8 option -->
<!-- FAT12 -->
<match key="volume.partition.msdos_part_table_type" int="0x01">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- FAT16 <32M -->
<match key="volume.partition.msdos_part_table_type" int="0x04">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- FAT16 -->
<match key="volume.partition.msdos_part_table_type" int="0x06">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- HPFS/NTFS -->
<match key="volume.partition.msdos_part_table_type" int="0x07">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- W95 FAT32 -->
<match key="volume.partition.msdos_part_table_type" int="0x0b">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- W95 FAT32 (LBA) -->
<match key="volume.partition.msdos_part_table_type" int="0x0c">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
<!-- W95 FAT16 (LBA) -->
<match key="volume.partition.msdos_part_table_type" int="0x0e">
<merge key="volume.policy.mount_option.utf8" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>
Does anyone know why this policy did not work? Many many thanks!
|