On 3/14/2009 10:22 PM, Jon A. Cruz wrote:
On Sat, 2009-03-14 at 17:48 -0500, Bob Jamison wrote:
resource = findSomeKindOfResource("specified/path");
This would allow the real files to be located in a variety/multitude of places, -including a cache-. A cache could be useful in the future. Mozilla does this. It would fix OSX's problem. And there could be a system and personal directory.
Also -- and we have been talking about this forever, and we really NEED to start thinking about implementing it -- stop using C or C++ strings for paths, and start using URIs. URI's not only have specific semantics, but their algorithms for resolve() and normalize() give predictable results for resource references. They would fix so many of these little problems with which we have been struggling.
actualURI = searchForResourceType(specifiedURI);
Whatever fixes we do, they need to be vanilla enough to work the same on at least our 3 main platforms identically. Linux-specific can be just as bad as Windows-specific.
Yes. This is very good, and where we need to move to.
Aside from not using defines and/or direct path building, I agree that we need to switch completely away from strings.
However, we can't use URIs. Those will break for us. What we really need to do is use IRIs.
That probably the same general intent you were thinking, but the URI calls GTK+ has comply with the URI RFC, which causes them to fail on non-ASCII data.
Well, that's what I -mean-, of course :-). Can't you read my mind by now? ^^
I have been meaning to work on the dom/uri code for a while, to handle IRIs. I don't think IRI is its own spec, but something like an addendum to URI. It's not so much the Unicode chars themselves, but how you handle escapes. But, yes, they would be so much nicer than what we have now.
The other uri.cpp, which is a wrapper of xml2's uri... I don't know if it can do IRI or not. Maybe that's in the libxml2 docs.
bob