[PATCH] Fix non-ascii file name problem (1 of 1)
[email protected] Tue, 27 Apr 2004 09:06:13 -0500
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/04/27 09:04:53-05:00 [email protected] # JFS: Fix non-ascii file name problem # # An unintentional sign extention caused non-ascii characters to be # stored incorrectly, leading to inaccessible files. Changing a # declaration to unsigned char fixes the problem. # diff -Nru a/fs/jfs/jfs_unicode.c b/fs/jfs/jfs_unicode.c --- a/fs/jfs/jfs_unicode.c Tue Apr 27 09:05:30 2004 +++ b/fs/jfs/jfs_unicode.c Tue Apr 27 09:05:30 2004 @@ -78,7 +78,7 @@ * FUNCTION: Convert character string to unicode string * */ -static int jfs_strtoUCS(wchar_t * to, const char *from, int len, +static int jfs_strtoUCS(wchar_t * to, const unsigned char *from, int len, struct nls_table *codepage) { int charlen; @@ -92,8 +92,7 @@ jfs_err("jfs_strtoUCS: char2uni returned %d.", charlen); jfs_err("charset = %s, char = 0x%x", - codepage->charset, - (unsigned char) *from); + codepage->charset, *from); return charlen; } }