diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-01-16 15:11:01 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-01-16 15:11:01 +0000 |
commit | e081f66987efe916c37394b1d0d58eb5ec90b023 (patch) | |
tree | 96300563a692f980b8dca84d996f98ad9c43ac30 /glib | |
parent | 3f4f4b7826fea56da887009c2e0e807462e89c13 (diff) | |
download | glibmm-e081f66987efe916c37394b1d0d58eb5ec90b023.tar.gz |
Added query_file_exists(). uri_unescape_string(), uri_escape_string():
2008-01-16 Murray Cumming <murrayc@murrayc.com>
* gio/src/file.hg: Added query_file_exists().
* glib/src/uriutils.hg:uri_unescape_string(), uri_escape_string():
Change the illegal_characters and reserved_chars_allowed parameters
to std::string, because they may not be UTF-8
See bug #508773.
svn path=/trunk/; revision=513
Diffstat (limited to 'glib')
-rw-r--r-- | glib/src/uriutils.hg | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/glib/src/uriutils.hg b/glib/src/uriutils.hg index b8426756..73080f28 100644 --- a/glib/src/uriutils.hg +++ b/glib/src/uriutils.hg @@ -19,9 +19,11 @@ _DEFS(glibmm,glib) -#include <glibmm/ustring.h> +#include <string> #include <glibmmconfig.h> +GLIBMM_USING_STD(string) + namespace Glib { @@ -30,6 +32,8 @@ namespace Glib * Various uri-related functions. */ +//Note that the illegal_characters and reserved_chars_allowed parameters are bytes and may not be UTF-8 +//so they are not Glib::ustring. See http://bugzilla.gnome.org/show_bug.cgi?id=508773 /** Unescapes a whole escaped string. * If any of the characters in @a illegal_characters or the character zero appears @@ -45,7 +49,7 @@ namespace Glib * @ingroup UriUtils * @newin2p16 */ -std::string uri_unescape_string(const Glib::ustring& escaped_string, const Glib::ustring& illegal_characters = Glib::ustring()); +std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = std::string()); //TODO: Use iterator? //char * g_uri_unescape_segment (const char *escaped_string, @@ -83,7 +87,7 @@ std::string uri_get_scheme(const std::string& uri); * @ingroup UriUtils * @newin2p16 */ -std::string uri_escape_string(const std::string& unescaped, const Glib::ustring& reserved_chars_allowed = Glib::ustring(), bool allow_utf8 = true); +std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = std::string(), bool allow_utf8 = true); } // namespace Glib |