Re: GtkFileChooser and UTF-8
- From: "Peter \"Firefly\" Lund" <firefly diku dk>
- To: Hubert Sokolowski <h sokolowski wsisiz edu pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkFileChooser and UTF-8
- Date: Tue, 7 Sep 2004 08:25:58 +0200 (MEST)
On Fri, 3 Sep 2004, Hubert Sokolowski wrote:
see the discussion at the top, then g_filename_to_utf8()
I don't think so. maybe I didn't explain it well. here are the problems:
I /do/ think so.
1. I create a file from let say xterm, the filename has characters from
my local character set. when I open a gtkfilechooser the filename is not
displayed correctly.
2. I create a directory from a gtkfilechooserdialog also with
foreign characters. then the name of the directory is displayed
correctly, but only in a gtkfilechooserdialog. in xterm it is not.
I attach 2 screenshots showing the problem with creating directory.
GTK+/Gnome expects filenames to be in UTF8 encoding. And rightfully so.
It is the only really sensible encoding there is but unfortunately not the
only one used - ISO 8859-1 (or -15!) is probably the most used of the not
so sensible ones.
There is no encoding marker attached to each filename so there is no way
of knowing with absolute certainty how a filename is supposed to be
interpreted.
Programs can be parochial and just assume the author's encoding or they
can make a guess if it can't be UTF8 or they can look at an environment
variable (which I believe is the current Red Hat workaround for this
situation). Neither solutions are particularly good.
-Peter
PS: Few of my filenames use characters outside 7-bit ASCII but many of
those who do are encoded using 8859-1 :( I still haven't transitioned
everything over to UTF8 yet. One of these days...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]