Messages in this thread | | | Date | Fri, 13 Feb 2004 00:17:02 +0000 | From | Jamie Lokier <> | Subject | Re: JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.) |
| |
John Bradford wrote: > > Definitely a good reason. It seem many assume file names are a local thing, > > but this is not so. Now consider the case with an external firewire > > disk or memory stick created on a machine with iso-8859-1 as the system character > > set and e.g xfs as the file system. What happens when I hook it up to a new redhat > > installation that thinks file names are best stored as utf8? Most non-ascii > > file names aren't even legal in utf8. > > Another thing to consider is that you can encode the same character in > several ways using utf8,
No, you can't. Only the shortest encoding of a character is valid UTF-8, and any program which claims to comply with Unicode is _required_ to reject all other encodings, citing security as the main reason.
That means any code which transcodes UTF-8 to another encoding (such as iso-8859-1) must reject the non-minimal forms as invalid characters, in whatever way that is done.
If there's any transcoding code in Linux which doesn't do that, it's a potential security hole and should be fixed.
> so two filenames could have different byte strings, but evaluate to > the same set of unicode characters.
That's true in some other encodings I think (the iso-2022 ones), but not UTF-8.
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |