From 0b3a8cd8f233ae037ea9e5cee78b710e3e962830 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 13 Dec 2018 04:46:07 +0100 Subject: remove Inkscape::URI::fromUtf8 --- src/object/uri.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/object/uri.cpp') diff --git a/src/object/uri.cpp b/src/object/uri.cpp index f6d044a6e..52fc9dc44 100644 --- a/src/object/uri.cpp +++ b/src/object/uri.cpp @@ -228,37 +228,6 @@ std::string URI::toNativeFilename() const return Glib::filename_from_uri(uristr); } -URI URI::fromUtf8( gchar const* path ) { - if ( !path ) { - throw MalformedURIException(); - } - Glib::ustring tmp; - for ( int i = 0; path[i]; i++ ) - { - gint one = 0x0ff & path[i]; - if ( ('a' <= one && one <= 'z') - || ('A' <= one && one <= 'Z') - || ('0' <= one && one <= '9') - || one == '_' - || one == '-' - || one == '!' - || one == '.' - || one == '~' - || one == '\'' - || one == '(' - || one == ')' - || one == '*' - ) { - tmp += (gunichar)one; - } else { - gchar scratch[4]; - g_snprintf( scratch, 4, "%%%02X", one ); - tmp.append( scratch ); - } - } - return URI( tmp.data() ); -} - /* TODO !!! proper error handling */ URI URI::from_native_filename(gchar const *path) { gchar *uri = g_filename_to_uri(path, nullptr, nullptr); -- cgit v1.2.3