patch-2.0.34 linux/Documentation/filesystems/vfat.txt

Next file: linux/Documentation/networking/depca.txt
Previous file: linux/Documentation/filesystems/isofs.txt
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.33/linux/Documentation/filesystems/vfat.txt linux/Documentation/filesystems/vfat.txt
@@ -8,6 +8,19 @@
 
 VFAT MOUNT OPTIONS
 ----------------------------------------------------------------------
+codepage=###  -- Sets the codepage for converting to shortname characters
+		 on FAT and VFAT filesystems.  By default, codepage 437
+		 is used.  This is the default for the U.S. and some
+		 European countries.
+iocharset=name-- Character set to use for converting between 8 bit characters
+		 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. There is also an option of
+		 doing UTF8 translations with the utf8 option.
+utf8	      -- 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     -- Translate unhandled Unicode characters to special
 		 escaped sequences.  This would let you backup and
 		 restore filenames that are created with any Unicode
@@ -31,18 +44,59 @@
                   
 quiet         -- Stops printing certain warning messages.
 
+Explanation of Native Language Support in the VFAT Filesystem
+----------------------------------------------------------------------
+There are two different character sets are needed by the vfat
+filesystem.  The first is the codepage character set.  The codepage is
+the character set that is used to store short filenames on disk.  Its
+mount option is 'codepage=437' which 437 is the codepage number.
+
+Long filenames are stored in Unicode, but since the Linux filesystem
+doesn't deal with 16 bit characters, we need some way of converting
+characters.  There are a couple options of how to do this.  One is to
+use the 'utf8' mount option and I will cover that a bit later.  The
+other is to use the 'iocharset=iso8859-1' mount option where the
+iso8859-1 tells the filesystem which character set is used for input
+and output.  If you are in Russia, you might specify koi8-r here.
+If a Unicode character on disk cannot be mapped to anything in the
+iocharset, it is replaced with a '?'.
+
+The iocharset is used to convert long filenames to and from Unicode.
+It is currently implemented.  The codepage is used to convert short
+filenames to and from the iocharset.  This translation is not currently
+implemented.
+
+If no iocharset is specified and the default is unable to be loaded,
+the mount will succeed while falling back to doing no conversions at
+all.  If a charset is explicity specified and the charset cannot be
+loaded, the mount will fail.
+
+For the codepage, the default mount option is 'codepage=437'.  If a
+codepage is explicitly asked for and the load of the character set
+fails, the mount will fail.  Is no codepage is explicitly asked for
+and the load of the character set fails, the load will still succeed.
+
+UTF8 is an 8 bit, filesystem safe representation of Unicode.  It does
+not lose any information in the conversion.  However, you need to have
+a terminal or a program that knows how to deal with UTF8.  The Linux
+console can be put into a mode where it will correctly display UTF8
+characters.  I don't know if there is a similar mode for xterms, but
+I don't believe there is.  More information about UTF8 can be found
+at http://www.unicode.com
 
 TODO
 ----------------------------------------------------------------------
-* Need to get rid of the raw scanning stuff.  Instead, always use
-  a get next directory entry approach.  The only thing left that uses
-  raw scanning is the directory renaming code.
+* When only shortnames exist, translate them from the codepage character
+  set to the iocharset.  Currently, translations only occur when longnames
+  exist.  To translate, first convert from codepage to Unicode and then
+  to the output character set.
 
 * Need to add dcache_lookup code msdos filesystem.  This means the
   directories need to be versioned like the vfat filesystem.
 
-* Add support for different codepages.  Right now, we only support
-  the a single English codepage.
+* Need to get rid of the raw scanning stuff.  Instead, always use
+  a get next directory entry approach.  The only thing left that uses
+  raw scanning is the directory renaming code.
 
 * Fix the Posix filesystem support to work in 8.3 space.  This involves
   renaming aliases if a conflict occurs between a new filename and
@@ -55,6 +109,7 @@
 * When a volume name is the same as a directory name in the root
   directory of the filesystem, the directory name sometimes shows
   up empty an empty file.
+* autoconv option does not work correctly.
 
 BUG REPORTS
 ----------------------------------------------------------------------
@@ -194,271 +249,3 @@
 
 Finally, note that the extended name is stored in Unicode.  Each Unicode
 character takes two bytes.
-
-
-NOTES ON UNICODE TRANSLATION IN VFAT FILESYSTEM
-----------------------------------------------------------------------
-(Information provided by Steve Searle <steve@mgu.bath.ac.uk>)
-
-Char used as   Char(s) used   Char(s) used in     Entries which have
-filename       in shortname   longname slot       been corrected
-0x80 (128)     0x80           0xC7                   
-0x81 (129)     0x9A           0xFC
-0x82 (130)     0x90           0xE9                     E
-0x83 (131)     0xB6           0xE2                     E
-0x84 (132)     0x8E           0xE4                     E
-0x85 (133)     0xB7           0xE0                     E
-0x86 (134)     0x8F           0xE5                     E
-0x87 (135)     0x80           0xE7                     E
-0x88 (136)     0xD2           0xEA                     E
-0x89 (137)     0xD3           0xEB                     E
-0x8A (138)     0xD4           0xE8                     E
-0x8B (139)     0xD8           0xEF                     E
-0x8C (140)     0xD7           0xEE                     E
-0x8D (141)     0xDE           0xEC                     E
-0x8E (142)     0x8E           0xC4                     E
-0x8F (143)     0x8F           0xC5                     E
-0x90 (144)     0x90           0xC9                     E
-0x91 (145)     0x92           0xE6                     E
-0x92 (146)     0x92           0xC6                     E
-0x93 (147)     0xE2           0xF4                     E
-0x94 (148)     0x99           0xF6
-0x95 (149)     0xE3           0xF2
-0x96 (150)     0xEA           0xFB
-0x97 (151)     0xEB           0xF9
-0x98 (152)     "_~1"          0xFF
-0x99 (153)     0x99           0xD6
-0x9A (154)     0x9A           0xDC
-0x9B (155)     0x9D           0xF8
-0x9C (156)     0x9C           0xA3
-0x9D (157)     0x9D           0xD8
-0x9E (158)     0x9E           0xD7
-0x9F (159)     0x9F           0x92
-0xA0 (160)     0xB5           0xE1
-0xA1 (161)     0xD6           0xE0
-0xA2 (162)     0xE0           0xF3
-0xA3 (163)     0xE9           0xFA
-0xA4 (164)     0xA5           0xF1
-0xA5 (165)     0xA5           0xD1
-0xA6 (166)     0xA6           0xAA
-0xA7 (167)     0xA7           0xBA
-0xA8 (168)     0xA8           0xBF
-0xA9 (169)     0xA9           0xAE
-0xAA (170)     0xAA           0xAC
-0xAB (171)     0xAB           0xBD
-0xAC (172)     0xAC           0xBC
-0xAD (173)     0xAD           0xA1
-0xAE (174)     0xAE           0xAB
-0xAF (175)     0xAF           0xBB
-0xB0 (176)     0xB0           0x91 0x25
-0xB1 (177)     0xB1           0x92 0x25
-0xB2 (178)     0xB2           0x93 0x25
-0xB3 (179)     0xB3           0x02 0x25
-0xB4 (180)     0xB4           0x24 0x25
-0xB5 (181)     0xB5           0xC1
-0xB6 (182)     0xB6           0xC2
-0xB7 (183)     0xB7           0xC0
-0xB8 (184)     0xB8           0xA9
-0xB9 (185)     0xB9           0x63 0x25
-0xBA (186)     0xBA           0x51 0x25
-0xBB (187)     0xBB           0x57 0x25
-0xBC (188)     0xBC           0x5D 0x25
-0xBD (189)     0xBD           0xA2
-0xBE (190)     0xBE           0xA5
-0xBF (191)     0xBF           0x10 0x25
-0xC0 (192)     0xC0           0x14 0x25
-0xC1 (193)     0xC1           0x34 0x25
-0xC2 (194)     0xC2           0x2C 0x25
-0xC3 (195)     0xC3           0x1C 0x25
-0xC4 (196)     0xC4           0x00 0x25
-0xC5 (197)     0xC5           0x3C 0x25
-0xC6 (198)     0xC7           0xE3                     E
-0xC7 (199)     0xC7           0xC3
-0xC8 (200)     0xC8           0x5A 0x25                E
-0xC9 (201)     0xC9           0x54 0x25                E
-0xCA (202)     0xCA           0x69 0x25                E
-0xCB (203)     0xCB           0x66 0x25                E
-0xCC (204)     0xCC           0x60 0x25                E
-0xCD (205)     0xCD           0x50 0x25                E
-0xCE (206)     0xCE           0x6C 0x25                E
-0xCF (207)     0xCF           0xA4                     E
-0xD0 (208)     0xD1           0xF0
-0xD1 (209)     0xD1           0xD0
-0xD2 (210)     0xD2           0xCA
-0xD3 (211)     0xD3           0xCB
-0xD4 (212)     0xD4           0xC8
-0xD5 (213)     0x49           0x31 0x01
-0xD6 (214)     0xD6           0xCD
-0xD7 (215)     0xD7           0xCE
-0xD8 (216)     0xD8           0xCF
-0xD9 (217)     0xD9           0x18 0x25
-0xDA (218)     0xDA           0x0C 0x25
-0xDB (219)     0xDB           0x88 0x25
-0xDC (220)     0xDC           0x84 0x25
-0xDD (221)     0xDD           0xA6
-0xDE (222)     0xDE           0xCC
-0xDF (223)     0xDF           0x80 0x25
-0xE0 (224)     0xE0           0xD3
-0xE1 (225)     0xE1           0xDF
-0xE2 (226)     0xE2           0xD4
-0xE3 (227)     0xE3           0xD2
-0xE4 (228)     0x05           0xF5
-0xE5 (229)     0x05           0xD5
-0xE6 (230)     0xE6           0xB5
-0xE7 (231)     0xE8           0xFE
-0xE8 (232)     0xE8           0xDE
-0xE9 (233)     0xE9           0xDA
-0xEA (234)     0xEA           0xDB
-0xEB (235)     0xEB           0xD9
-0xEC (236)     0xED           0xFD
-0xED (237)     0xED           0xDD
-0xEE (238)     0xEE           0xAF
-0xEF (239)     0xEF           0xB4
-0xF0 (240)     0xF0           0xAD
-0xF1 (241)     0xF1           0xB1
-0xF2 (242)     0xF2           0x17 0x20
-0xF3 (243)     0xF3           0xBE
-0xF4 (244)     0xF4           0xB6
-0xF5 (245)     0xF5           0xA7
-0xF6 (246)     0xF6           0xF7
-0xF7 (247)     0xF7           0xB8
-0xF8 (248)     0xF8           0xB0
-0xF9 (249)     0xF9           0xA8
-0xFA (250)     0xFA           0xB7
-0xFB (251)     0xFB           0xB9
-0xFC (252)     0xFC           0xB3
-0xFD (253)     0xFD           0xB2
-0xFE (254)     0xFE           0xA0 0x25
-0xFF (255)     0xFF           0xA0
-
-
-Page 0
-0x80 (128)     0x00
-0x81 (129)     0x00
-0x82 (130)     0x00
-0x83 (131)     0x00
-0x84 (132)     0x00
-0x85 (133)     0x00
-0x86 (134)     0x00
-0x87 (135)     0x00
-0x88 (136)     0x00
-0x89 (137)     0x00
-0x8A (138)     0x00
-0x8B (139)     0x00
-0x8C (140)     0x00
-0x8D (141)     0x00
-0x8E (142)     0x00
-0x8F (143)     0x00
-0x90 (144)     0x00
-0x91 (145)     0x00
-0x92 (146)     0x00
-0x93 (147)     0x00
-0x94 (148)     0x00
-0x95 (149)     0x00
-0x96 (150)     0x00
-0x97 (151)     0x00
-0x98 (152)     0x00
-0x99 (153)     0x00
-0x9A (154)     0x00
-0x9B (155)     0x00
-0x9C (156)     0x00
-0x9D (157)     0x00
-0x9E (158)     0x00
-0x9F (159)     0x92
-0xA0 (160)     0xFF
-0xA1 (161)     0xAD
-0xA2 (162)     0xBD
-0xA3 (163)     0x9C
-0xA4 (164)     0xCF
-0xA5 (165)     0xBE
-0xA6 (166)     0xDD
-0xA7 (167)     0xF5
-0xA8 (168)     0xF9
-0xA9 (169)     0xB8
-0xAA (170)     0x00
-0xAB (171)     0xAE
-0xAC (172)     0xAA
-0xAD (173)     0xF0
-0xAE (174)     0x00
-0xAF (175)     0xEE
-0xB0 (176)     0xF8
-0xB1 (177)     0xF1
-0xB2 (178)     0xFD
-0xB3 (179)     0xFC
-0xB4 (180)     0xEF
-0xB5 (181)     0xE6
-0xB6 (182)     0xF4
-0xB7 (183)     0xFA
-0xB8 (184)     0xF7
-0xB9 (185)     0xFB
-0xBA (186)     0x00
-0xBB (187)     0xAF
-0xBC (188)     0xAC
-0xBD (189)     0xAB
-0xBE (190)     0xF3
-0xBF (191)     0x00
-0xC0 (192)     0xB7
-0xC1 (193)     0xB5
-0xC2 (194)     0xB6
-0xC3 (195)     0xC7
-0xC4 (196)     0x8E
-0xC5 (197)     0x8F
-0xC6 (198)     0x92
-0xC7 (199)     0x80
-0xC8 (200)     0xD4
-0xC9 (201)     0x90
-0xCA (202)     0xD2
-0xCB (203)     0xD3
-0xCC (204)     0xDE
-0xCD (205)     0xD6
-0xCE (206)     0xD7
-0xCF (207)     0xD8
-0xD0 (208)     0x00
-0xD1 (209)     0xA5
-0xD2 (210)     0xE3
-0xD3 (211)     0xE0
-0xD4 (212)     0xE2
-0xD5 (213)     0xE5
-0xD6 (214)     0x99
-0xD7 (215)     0x9E
-0xD8 (216)     0x9D
-0xD9 (217)     0xEB
-0xDA (218)     0xE9
-0xDB (219)     0xEA
-0xDC (220)     0x9A
-0xDD (221)     0xED
-0xDE (222)     0xE8
-0xDF (223)     0xE1
-0xE0 (224)     0x85, 0xA1
-0xE1 (225)     0xA0
-0xE2 (226)     0x83
-0xE3 (227)     0xC6
-0xE4 (228)     0x84
-0xE5 (229)     0x86
-0xE6 (230)     0x91
-0xE7 (231)     0x87
-0xE8 (232)     0x8A
-0xE9 (233)     0x82
-0xEA (234)     0x88
-0xEB (235)     0x89
-0xEC (236)     0x8D
-0xED (237)     0x00
-0xEE (238)     0x8C
-0xEF (239)     0x8B
-0xF0 (240)     0xD0
-0xF1 (241)     0xA4
-0xF2 (242)     0x95
-0xF3 (243)     0xA2
-0xF4 (244)     0x93
-0xF5 (245)     0xE4
-0xF6 (246)     0x94
-0xF7 (247)     0xF6
-0xF8 (248)     0x9B
-0xF9 (249)     0x97
-0xFA (250)     0xA3
-0xFB (251)     0x96
-0xFC (252)     0x81
-0xFD (253)     0xEC
-0xFE (254)     0xE7
-0xFF (255)     0x98
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov