Re: JFS default behavior / UTF-8 filenames

From: Dave Kleikamp
Date: Thu Feb 19 2004 - 09:07:17 EST


On Thu, 2004-02-19 at 04:59, kernel@xxxxxxxxxxxx wrote:
> For filesystems like JFS and NTFS, I think this is the best way in the
> long run, have the kernel output as UTF-8 by default, assume UTF-8
> inputs, and reject non-UTF8 filenames because they can't really store
> the arbitrary string of bytes model anyway.

Actually, I just submitted a patch to fix the default behavior of JFS to
always treat the name as an arbitrary string. The previous default
depended on the value of CONFIG_NLS_DEFAULT. Setting the mount option
iocharset=utf8 will reject non-utf8 filenames as you propose.

The arbitrary string of bytes is treated as the latin1 charset in that
it is stored as 0x00nn (in UTF2), but JFS really doesn't care what the
character set is.

> For others which can, maybe leave it up to the filesystem creator
> whether to reject non-UTF8 filenames or to accept invalid ones as well?

It's been said before, but a posix-compliant file system should accept
any bytes other that NUL and '/'.

Shaggy
--
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/