Re: UTF-8 practically vs. theoretically in the VFS API

From: Linus Torvalds
Date: Tue Feb 17 2004 - 22:32:44 EST




On Tue, 17 Feb 2004, H. Peter Anvin wrote:
>
> Well, the reason you'd want an out-of-band mechanism is to be able to
> display it as some kind of escapes.

I'd suggest just doing that when you convert the utf-8 format to printable
format _anyway_. At that point you just make the "printable"
representation be the binary escape sequence (which you have to have for
other non-printable utf-8 characters anyway).

And if you do things right (ie you allow user input in that same escaped
output format), you can allow users to re-create the exact "broken utf-8".
Which is actually important just so that the user can fix it up (ie
imagine the user noticing that the filename is broken, and now needs to do
a "mv broken-name fixed-name" - the user needs some way to re-create the
brokenness).

Linus
-
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/