Mercurial > audlegacy
changeset 4600:e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
using UTF-8 and g_strescape() assumes ASCII.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Jun 2008 19:09:27 +0300 |
parents | 19add87af18a |
children | 0a2255b9e80b |
files | src/libaudclient/audctrl.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/libaudclient/audctrl.c Sun Jun 01 14:55:15 2008 +0300 +++ b/src/libaudclient/audctrl.c Wed Jun 04 19:09:27 2008 +0300 @@ -1028,16 +1028,23 @@ if (G_IS_VALUE(&value) == FALSE) return NULL; + /* I think the original "purpose" of using g_strescape() here + * has probably been to escape only \n, \t, \r, etc. but the function + * actually escapes all non-ASCII characters. Which is bad, since we + * are using UTF-8. -- ccr + */ if (G_VALUE_HOLDS_STRING(&value)) - s = g_strescape(g_value_get_string(&value), NULL); + //s = g_strescape(g_value_get_string(&value), NULL); + s = g_strdup(g_value_get_string(&value)); else if (g_value_type_transformable(G_VALUE_TYPE(&value), G_TYPE_STRING)) { GValue tmp_value = { 0, }; g_value_init(&tmp_value, G_TYPE_STRING); g_value_transform(&value, &tmp_value); - - s = g_strescape(g_value_get_string(&tmp_value), NULL); + + //s = g_strescape(g_value_get_string(&tmp_value), NULL); + s = g_strdup(g_value_get_string(&tmp_value)); g_value_unset(&tmp_value); }