Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83025 - Hal mounts FAT as UTF8 by default
Summary: Hal mounts FAT as UTF8 by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 19:24 UTC by Rich McNeary
Modified: 2005-04-17 12:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Changes the paolicy for vfat so a mount iocharset option is not passed. (hal_utf8.patch,572 bytes, patch)
2005-02-22 19:26 UTC, Rich McNeary
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rich McNeary 2005-02-22 19:24:38 UTC
Plug a CF card into a multi-slot USb card reader.
The device is created properly and fstab is updated.
Attempt to mount the device.
Mount error.

Error from dmesg is, "FAT: Unrecognized mount option "iocharset=utf8" or missing value."

Hal's /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi file has the default policy,
	  <!-- 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>

However the kernel documentation says this is a bad idea, and sure enough when I change "true" to "false" the card mounts correctly.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Rich McNeary 2005-02-22 19:26:53 UTC
Created attachment 51918 [details, diff]
Changes the paolicy for vfat so a mount iocharset option is not passed.
Comment 2 Peter Johanson (RETIRED) gentoo-dev 2005-02-22 19:46:15 UTC
I can add that this bit me in the *ss too, when my iPod freaked out when mounted as UTF8.
Comment 3 Mike Gardiner (RETIRED) gentoo-dev 2005-02-28 02:37:32 UTC
Hmm, upstream like their UTF-8... Okay, the patch works for non-UTF-8 encoded VFAT partitions, but does it also work for UTF-8 partitions?
Comment 4 foser (RETIRED) gentoo-dev 2005-03-08 14:16:00 UTC
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144600

this report seems to be the cause of the change... the last comment is interesting. 

Relevant part of the document referenced :
iocharset=name -- Character set to use for converting between the
		 encoding is used for user visible filename and 16 bit
		 Unicode characters. Long filenames are stored on disk
		 in Unicode format, but Unix for the most part doesn't
		 know how to deal with Unicode.
		 By default, FAT_DEFAULT_IOCHARSET setting is used.

		 There is also an option of doing UTF8 translations
		 with the utf8 option.

		 NOTE: "iocharset=utf8" is not recommended. If unsure,
		 you should consider the following option instead.
 
utf8=<bool>   -- UTF8 is the filesystem safe version of Unicode that
		 is used by the console.  It can be be enabled for the
		 filesystem with this option. If 'uni_xlate' gets set,
		 UTF8 gets disabled.

uni_xlate=<bool> -- Translate unhandled Unicode characters to special
		 escaped sequences.  This would let you backup and
		 restore filenames that are created with any Unicode
		 characters.  Until Linux supports Unicode for real,
		 this gives you an alternative.  Without this option,
		 a '?' is used when no translation is possible.  The
		 escape character is ':' because it is otherwise
		 illegal on the vfat filesystem.  The escape sequence
		 that gets used is ':' and the four digits of hexadecimal
		 unicode.

So in short, if we change it to utf8(=1) does that make a difference ?
Comment 5 foser (RETIRED) gentoo-dev 2005-04-17 12:04:48 UTC
despite noone answering to my question for over a month (not such a big deal after all ?) I changed the default to utf8 in 0.4.7-r2.