summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiyang Hu <liyang@nerv.cx>2002-04-14 23:28:40 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-04-14 23:28:40 -0700
commitde6ca58cca1a0b2452321cdbdec0dead70dbf5b5 (patch)
treeaeb2d21dcb2e57e9aeaeda2db25c3ae04aa24c8c /include/linux
parentc544f64e841608d6b4c838cd5f86696831f804ad (diff)
[PATCH] Bug in NLS UTF-8 code
I've recently (actually, last month, but I had been a bit too busy since then) come across a wee problem, in what I originally thought was the VFAT code -- having `utf8' as one of the options, creating UTF-8 file names on a VFAT partition mysteriously gains a couple of (random) characters just after the UTF-8 escaped character: eg. touch "fooCbar" where C is an UTF-8 escape sequence ends up creating a file named "fooCRbar". (R being some random character.) I eventually tracked it down to one line in fs/nls/nls_base.c -- the UCS-2 (wchar_t) string pointer was being incremented too fast. After consulting Ogawa Hirofumi-san on the subject, he mentioned that include/linux/nls.h also needs to be changed for proper UTF-8 support in the NLS code.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nls.h b/include/linux/nls.h
index f47902bcfdb0..2ab6466f8043 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -18,7 +18,7 @@ struct nls_table {
};
/* this value hold the maximum octet of charset */
-#define NLS_MAX_CHARSET_SIZE 3
+#define NLS_MAX_CHARSET_SIZE 6 /* for UTF-8 */
/* nls.c */
extern int register_nls(struct nls_table *);