[Bug 747315] EXIF tags: should write strings as UTF-8 by default, not Latin1
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jun 21 08:40:42 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=747315
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #330094|none |needs-work
status| |
--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 330094:
--> (https://bugzilla.gnome.org/review?bug=747315&attachment=330094)
::: gst-libs/gst/tag/gstexiftag.c
@@ +814,3 @@
+
+ /* UTF8 is endianness independent */
+ if (g_utf8_validate (str, -1, &str_end))
Shouldn't all tags *we* get from a taglist and write into EXIF be valid UTF8 in
any case? The old code also assumes that
@@ -832,3 @@
- else
- ascii_str =
- g_convert (str, -1, "latin1", "utf8", NULL, &ascii_size, &error);
IMHO if the standard does not define anything, latin1 is as valid as UTF8 but I
guess nowadays UTF8 is more common. It would be good if a new version of the
EXIF standard could define this (how can you define a standard containing text
without thinking of the character set encoding... who doesn't speak/write
English anyway?)
::: tests/check/libs/tag.c
@@ +1447,3 @@
+ /* utf8 characters */
+ g_value_set_static_string (&value,
+ "Τη γλώσσα μου έδωσαν ελληνική");
Might make sense to also add a test for >2 byte characters. Where does this one
come from btw? Just curious :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list