mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
tags: when converting freeform strings try Windows-1252 as fallback instead of ISO-8859-1
Windows-1252 is a superset of ISO-8859-1, which uses some space allocated to control characters for additional printable characters. https://bugzilla.gnome.org/show_bug.cgi?id=630471
This commit is contained in:
parent
71f89ac092
commit
b3e39daee0
1 changed files with 3 additions and 3 deletions
|
@ -442,9 +442,9 @@ gst_tag_freeform_string_to_utf8 (const gchar * data, gint size,
|
|||
}
|
||||
}
|
||||
|
||||
/* Try ISO-8859-1 */
|
||||
GST_LOG ("Trying to convert freeform string using ISO-8859-1 fallback");
|
||||
utf8 = g_convert (data, size, "UTF-8", "ISO-8859-1", &bytes_read, NULL, NULL);
|
||||
/* Try Windows-1252 */
|
||||
GST_LOG ("Trying to convert freeform string using Windows-1252 fallback");
|
||||
utf8 = g_convert (data, size, "UTF-8", "Windows-1252", &bytes_read, NULL, NULL);
|
||||
if (utf8 != NULL && bytes_read == size) {
|
||||
goto beach;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue