
On Sep 29, 2009, at 4:57 AM, Bob Jamison wrote:
I suspect there is a problem either with the URI impl or how it is being used.
But I'm kinda pro URIs. Yes, the URI API as stated in the W3C doc does not have a getNativePath() method as far as I know. However, Java's runtime, XML2, and other libs -do- include such a call, and it is quite useful. I think it has become a defacto requirement.
Actually Mental and I both have looked into this a fair bit. URI as defined by the spec is not really usable for arbitrary filenames. Java's implementation is interesting, but also falls down. When doing some Java work a while back I recall hitting some of those issues.
For the glib world, I seem to recall that these break down: g_filename_from_uri() g_filename_to_uri()
One of the trickiest things to deal with is converting to and from file names when those names are *not* in UTF-8. We need to remember to keep those in our testing, as all data internal to Inkscape needs to be Unicode + UTF-8.
Basically I recall that IRI's should work nicely for our needs, with an implicit assumption that they will work as URIs for most APIs we care about. But using IRIs will keep us from failing in some edge cases.