Re: gnome_vfs_uri_extract_short_name() considered harmful
- From: Alexander Larsson <alexl redhat com>
- To: Federico Mena Quintero <federico ximian com>
- Cc: "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>
- Subject: Re: gnome_vfs_uri_extract_short_name() considered harmful
- Date: 11 Aug 2004 09:05:52 +0200
On Mon, 2004-07-19 at 19:45, Federico Mena Quintero wrote:
> The function gnome_vfs_uri_extract_short_name() does this:
>
> - Grab the string after the last slash
> - Unescape that short string
>
> This gives you a raw chunk of bytes. Since you don't have the encoding
> for it, it's useless.
raw chunks of bytes is what filenames are. So i don't really get the
problem. The string is not useless, its useful for constructing other
URIs.
It is however not in general displayable to the user, which is a bit
problematic. Nautilus/Eel handles this by considering name and display
name separate entities, and having code to handle things like
G_BROKEN_FILENAMES for local files. However, for many uri type we really
have no way to know the encoding (e.g. ftp://) so those are hard to
display right.
> Eel wraps this as eel_uri_get_basename(), which has the exact same
> problems. Gedit has a bug due to this, and I can imagine that programs
> which use this functions will have bugs of the same sort.
What sort of bug was this?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a shy umbrella-wielding senator with a mysterious suitcase handcuffed to
his arm. She's a radical psychic detective with an MBA from Harvard. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]