Re: Natilus using UTF-8 for filenames regardless of locale

On Fri, Jul 16, 2004 at 10:36:02PM +0200, Mika Fischer wrote:
> Am Fri, 16 Jul 2004 13:22:36 -0400 schrieb Owen Taylor:
> > The problem is that it doesn't work to use locale-encoded filenames:
> Well, it worked remarably well for me so far...

because you've been using it only for your and/or german and/or european stuff
which is usually iso-8859-1 (or 15).
i also didn't care that much for it until i've found some japanese files :))
> >  - If you create a tarball on your system, how should the
> >    filenames be encoded?
> I'd guess that tar considers the filename as an octet string and doesn't
> mess with the encoding at all.
yes, but the problem is:
if you create a tarball and give it to me,
nowi will have to switch to YOUR locale to be able to see correct filenames?

> > There is no guessing going on.
> This is not. As Maciej already wrote, UTF-8 and the iso-8859-* charsets do
> not have the same representation for non-ASCII characters.
> IIRC iso-8859-* characters that are not also ASCII characters are not even
> legal UTF-8 characters.
> So there certainly is something going on here. When Nautilus comes across
> a filename that is obviously not in UTF-8 it somehow gets the right
> charset and also displays the filename correcty.
> This is what my question was about. Where does Nautilus get the right
> character set from?
> (BTW: This leads to situations where two different files can show up in
> Nautilus with the same filename :))

the guessing is usually something like this:
the application assumes that the filename is utf8. he begins to read it.
but then he founds out that it's not valid utf8. then he uses something else (
usually iso-8859-1 or locale-defined one).
> > To get filenames working correctly, you need to use a UTF-8 locale.
> > That's it.
> That's what I was hoping not to hear. The reason is that some of the
> applications I use don't cope too well with UTF-8 (the main culprit being
> zsh). So that is not an option (for me and at this moment).

are you sure about this?
i don't use zsh, but it should be able to cope with utf8.

locale defines many things...file sort order, how to display dates and time and so on.

filename encoding simply should not be part of it imho.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]