# HG changeset patch # User Matti Hamalainen # Date 1212595767 -10800 # Node ID e5119c001bb485dc7e5f65513f381f10ea34ed2a # Parent 19add87af18a578e906c7b74556a0fd2118bc701 Don't escape strings in audacious_get_tuple_field_data(), because we are using UTF-8 and g_strescape() assumes ASCII. diff -r 19add87af18a -r e5119c001bb4 src/libaudclient/audctrl.c --- 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); }