Bug 162710
Summary: | usb sticks with FAT filesystem don't use utf8 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Roland Wolters <roland.wolters> | ||||
Component: | hal | Assignee: | John (J5) Palmieri <johnp> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4 | CC: | chaghi, jkeck, wtogami | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 0.5.2-2.fc4.1 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-01-30 22:25:40 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Roland Wolters
2005-07-07 22:20:37 UTC
I misspelled the first line: <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">false</merge> must be <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>. With that line the mount of the vfat Filesystems goes right. But the original problem that the standard is not utf8 or usc-2 compatible in any way still exists! Ok, I've talked to some people, they told me that this problem is a problem of the kernel, not of hal, so I changed this to 'Component: kernel' The Problem: the kernel does not uses the standard-NLS while mounting vfat filesystems, although $ grep NLS /boot/config-2.6.12-1.1390_FC4 [...] CONFIG_NLS=y CONFIG_NLS_DEFAULT="utf8" [...] CONFIG_NLS_UTF8=m The result is, that I cannot read special chars like the german umlauts äöü when I mount a usb disk or something like that. from man mount ... iocharset=value Character set to use for converting between 8 bit characters and 16 bit Unicode characters. The default is iso8859-1. Long filenames are stored on disk in Unicode format. The default the kernel uses is irrelevant if userspace is asking for something else. From the kernel help text about CONFIG_NLS_DEFAULT.. The default NLS used when mounting file system. Note, that this is the NLS used by your console, not the NLS used by a specific file system (if different) to store data (filenames) on a disk. Looks to me like if we want UTF-8 to be used always, we need those lines added to HAL. Is it wise to get these lines as standard, or are there reasons against having such standards? I added these lines to /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi <!-- Use UTF-8 charset for vfat --> <match key="volume.fstype" string="vfat"> <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge> </match> I'm not sure if this is the right place, but it works. I can also confirm that this worked out of the box with FC3, and I'm *almost* sure it worked with FC4 not so long ago. If I just add these lines in the second device section somewhere it doesn't work after restarting the hal daemon. I can't believe that Fedora Core, although working with utf8 internally, is working bad here... There is still the question why these lines are not standard for Fedora Core. What's about FC5? Is this problem supposed to be solved there? Especially when Fedora Core wants to support Chinese they should definitely do something around here! Created attachment 123145 [details]
Patch to mount vfat with utf8
I hope that helps, but I wonder if it would be better to post this at
freedesktop bugzilla.
Sorry, forget the last post, that was not what we wanted (and it was uncommented, too, sorry about that). I've tested around a lot, and think now, that the easiest solution is what Mariano in comment 5 meant: to add a line which is checking for the key "volume.fstype", and to pick out these ones which has as string "vfat". Then we cann pass the mount options with merging the keys "volume.policy.mount_option.iocharset=utf8" and "volume.policy.mount_option.shortname=mixed" as true. All over all, we can add this almost to the ned of the file (short before </deviceinfo>), when we add <device>-tags to the part. It should like this: <!-- Use UTF-8 charset for vfat --> <device> <match key="volume.fstype" string="vfat"> <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge> <merge key="volume.policy.mount_option.shortname=mixed" type="bool">true</merge> </match> </device> It works, tested with two different devices (iAudio player and partitioned external hard drive). FC4 should already have the fix. I belive it was pushed last week. Rawhide will have it when upstream does its next release. Yes, I can confirm this patch, it works like a charm. Before I just had another test-package from another repo which haven't had included the patch, so I thought the problem still exists. So the bug can be closed. Solution: update the hal package to at least hal-0.5.2-2.fc4.1 |