On Thu, 2005-12-15 at 10:43 +0100, Murray Cumming wrote:
>
> And gnome_vfs_uri_new() wants an escaped URI?
> And gnome_vsf_uri_to_string() returns an escaped URI?
Yes. All instances of URIs are escaped. There really isn't anything like
an "unescaped URI". Valid URIs by specification are escaped. In other
words, neither "öäå", "/tmp/öäå" or "file:///tmp/åäö" are valid uris.
Of course, such "URI"s regularly appear as user input in e.g. location
entries or whatnot. This is why gnome-vfs has a set of functions for
converting these into actual uris:
gnome_vfs_make_uri_from_input
gnome_vfs_make_uri_from_input_with_trailing_ws
gnome_vfs_make_uri_from_input_with_dirs
gnome_vfs_make_uri_from_shell_arg
There is also a function to display a uri nicely:
gnome_vfs_format_uri_for_display
Its even guaranteed that roundtrips of a uri via
gnome_vfs_format_uri_for_display and then gnome_vfs_make_uri_from_input
do not loose data, so you can use this to implement e.g. a location
entry.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[EMAIL PROTECTED] [EMAIL PROTECTED]
He's a short-sighted white trash shaman with a robot buddy named Sparky. She's
a radical streetsmart nun in the wrong place at the wrong time. They fight
crime!
_______________________________________________
gnome-vfs-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list