Re: [Nautilus-list] A fix for non-ASCII characters (and hello)
- From: Owen Taylor <otaylor redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: Håvard Wigtil <havardw stud ntnu no>, Nautilus <nautilus-list lists eazel com>
- Subject: Re: [Nautilus-list] A fix for non-ASCII characters (and hello)
- Date: Fri, 18 Jan 2002 16:44:40 -0500 (EST)
Darin Adler <darin bentspoon com> writes:
> On 1/18/02 12:25 PM, "Håvard Wigtil" <havardw stud ntnu no> wrote:
>
> > I've been looking at how I can contribute to Nautilus.
>
> Great! Welcome.
>
> > I built Gnome 2
> > from CVS, and discovered that Nautilus can't even spell my name!
> > ('Håvard' becomes 'H?vard'). Investigation shows that the file name
> > conversion code (make_valid_utf8 in libnautilus-private/nautilus-file.c)
> > doesn't try to convert non-ASCII characters, it just replaces them with
> > question marks.
>
> That's incorrect.
>
> What's happening here is that the file name is encoded in ISO-8859-1, and
> glib 2.x treats all file names as if they are UTF-8. It's not all non-ASCII
> characters that are replaced with question marks; illegal UTF-8 sequences
> are replaced with question marks, but you can use all sorts of non-ASCII
> characters.
>
> If you have a file that has the name 'Håvard' encoded in UTF-8, then it will
> show up fine in Nautilus. But the other tools on your system, like ls and
> the terminal, are using ISO-8859-1, which makes things rather confusing.
>
> We need to talk to the glib maintainers and other experts about how to deal
> with this.
What I said at:
http://bugzilla.gnome.org/show_bug.cgi?id=69059
I'm pretty firm in my opinion that putting locale dependent
filenames on the hard drive is wrong. But since I know
that some people will disagree, or will need to use
locale dependent filenames, that is the reason for
G_BROKEN_FILENAMES.
- It's an environment variable because that's the only
way we have of doing configuration at the GLib level
that will apply to all programs using GLib.
- It's called "G_BROKEN_FILENAMES" because I want to
editorialize that it is a bad thing to have such
filenames. If you don't run in a UTF-8 locale,
you should restrict your filenames to ASCII.
If all GNOME programs use g_filename_to_utf8() than
user configuration of this will work properly.
(Note that I suspect that nautilus should internally
manipulate filenames in the on-disk-encoding, and only
convert for display/interchange. Otherwise it will
be impossible to manipulate files with invalid filenames,
like, say, rename them to something valid.)
regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]