fat: Mitigate the lack of UTF-8 case folding

FAT has to convert between Linux filenames ('iocharset' encoding,
should be UTF-8 today) and native filenames (UTF-16 for long names,
'codepage' encoding for short names).  And it has to do case
folding in multiple encodings.  Unfortunately Linux doesn't
implement case-folding for UTF-8, resulting in inconsistent name
lookup behaviour as shown in bug #833238.

The 'utf8' option makes FAT assume the Linux filename encoding is
UTF-8, regardless of the 'iocharset' encoding.  Enabling this and
setting iocharset=ascii mitigates the problems by enabling case-
folding for the ASCII subset.

Make that the default by enabling FAT_DEFAULT_UTF8 and setting
FAT_DEFAULT_IOCHARSET to "ascii".
This commit is contained in:
Ben Hutchings 2016-08-26 02:31:50 +01:00
parent 6ab7944873
commit 0e156c15e3
2 changed files with 8 additions and 1 deletions

3
debian/changelog vendored
View File

@ -32,6 +32,9 @@ linux (4.7.2-1) UNRELEASED; urgency=medium
* aufs: Update support patches to aufs4.7-20160822 (Closes: #834764)
* [powerpc*] ipmi: Enable IPMI_POWERNV as module (Closes: #833861)
* kbuild: Do not use hyphen in exported variable name (Closes: #833561)
* fat: Mitigate the lack of UTF-8 case folding by enabling
FAT_DEFAULT_UTF8 and setting FAT_DEFAULT_IOCHARSET to "ascii"
(Closes: #833238)
[ Martin Michlmayr ]
* [armhf] Enable MMC_SDHCI_IPROC and HW_RANDOM_BCM2835 for BCM2835.

View File

@ -5106,7 +5106,11 @@ CONFIG_F2FS_FS_ENCRYPTION=y
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
#. Mitigate the lack of UTF-8 case-folding which makes FAT name lookup
#. inconsistent (#833238). This combination enables case-folding the
#. ASCII subset while still encoding/decoding as UTF-8.
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
CONFIG_FAT_DEFAULT_UTF8=y
##
## file: fs/freevxfs/Kconfig