It seems to me that there's a lot of inconsistency with the string encodings in different parts of gecko. Right now, I'm trying to make my own comparison of the current URI that the browser is showing, and the value I'm about to load/display. This is very difficult to do with just nsEmbedString and nsEmbedCString.
nsIWebNavigation::LoadURI() wants a UTF16-encoded string for the URI. However, if you call GetSpec() on a URI, it gives you back a UTF8-encoded string. It is not easy to compare these two. How are embedders supposed to manage such things? Multi-byte vs. ASCII vs. two-byte in addition to different Unicode encodings. Many times the documentation for functions/methods are not clear what type of encoding they want the string to be in (though it is clear whether its multi-byte vs. dual-byte b/c of nsAString and nsACString). Am I missing something obvious here? Ideally, I'd be able to create a URI from my text I want to compare, then call nsIURI::Equal(), but I have to pull in way too many header files from mozilla to be able to do that. Am I outside the bounds of the "normal" embedding app? J _______________________________________________ mozilla-embedding mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-embedding
