Commit 2c58a71f authored by Dave Kleikamp's avatar Dave Kleikamp

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.
parent 9fa12b00
......@@ -78,7 +78,7 @@ int jfs_strfromUCS_le(char *to, const wchar_t * from, /* LITTLE ENDIAN */
* 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 @@ static int jfs_strtoUCS(wchar_t * to, const char *from, int len,
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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment