Re: Exposing get_filename_charset



On Thu, 2004-10-28 at 10:55 -0500, Federico Mena Quintero wrote:
> On Thu, 2004-10-28 at 10:42 -0400, Owen Taylor wrote:
> 
> > Well, you wouldn't want exactly that, perhaps, since G_FILENAME_ENCODING
> > is defined as a comma-separated list of encodings and
> > get_filename_charset() just returns the first one.
> >
> > The other question is whether we could push down what you are doing
> > in Nautilus to GLib with a 
> > 'g_filename_display_name (const char *filename)' or something like
> > that.
> 
> Such a function would be very useful.
> 
> We also need something for URIs, but encoding for unescaped URIs is not
> well defined.  See http://bugzilla.gnome.org/show_bug.cgi?id=148620 for
> how I "fixed" this in EggRecent --- it simply checks to see if the
> unescaped base name is valid UTF-8; otherwise, it replaces invalid
> characters by "?".

Somewhat similar to nautilus_get_uri_shortname_for_display, but handles
a few less cases.


> Also, there's http://bugzilla.gnome.org/show_bug.cgi?id=154695 in which
> glib and gnome-vfs disagree on how to escape URIs.

Why are we comparing escaped uris? Escaped uris are not a canonical
form, so it can always fail for various reasons.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a short-sighted Jewish boxer with a winning smile and a way with the 
ladies. She's a tortured wisecracking traffic cop from a different time and 
place. They fight crime! 




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