[gimp/gimp-2-10] libgimpbase: fix #1350 Failure to load metadata importing image with non-latin unicode path
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] libgimpbase: fix #1350 Failure to load metadata importing image with non-latin unicode path
- Date: Mon, 9 Aug 2021 16:26:01 +0000 (UTC)
commit 05403696cbf1cf90e3ea29fe20af8a9d2fdbe5d0
Author: Jacob Boerema <jgboerema gmail com>
Date: Sun Aug 8 19:31:14 2021 -0400
libgimpbase: fix #1350 Failure to load metadata importing image with non-latin unicode path
On Windows loading metadata from images with non ASCII characters in their
path failed. Part of the fix is in gexiv2 that now converts the path from
utf-8 to utf-16 on Windows.
However we were still sending a localized path to gexiv2 where it was
expecting utf-8. This caused the conversion and thus loading of metadata
to fail. Fix is to remove the special handling for Windows and use the
utf-8 filename.
(cherry picked from commit 65950de735d5461b6ba9fb30d011b3976d75d792)
libgimpbase/gimpmetadata.c | 15 ---------------
1 file changed, 15 deletions(-)
---
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index 4c16283af5..9af9718124 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -908,22 +908,7 @@ gimp_metadata_load_from_file (GFile *file,
return NULL;
}
-#ifdef G_OS_WIN32
- filename = g_win32_locale_filename_from_utf8 (path);
- /* FIXME!
- * This call can return NULL, which later crashes the call to
- * gexiv2_metadata_open_path().
- * See bug 794949.
- */
- if (! filename)
- {
- g_set_error (error, GIMP_METADATA_ERROR, 0,
- _("Conversion of the filename to system codepage failed."));
- return NULL;
- }
-#else
filename = g_strdup (path);
-#endif
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]