changeset 3817:5ea2431c12bf trunk

Handle Unicode/UTF-8 in tuple data.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 20 Oct 2007 06:05:04 +0300
parents aad4dc862bc7
children 10a72af488d9
files src/audacious/tuple_compiler.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_compiler.c	Sat Oct 20 06:04:33 2007 +0300
+++ b/src/audacious/tuple_compiler.c	Sat Oct 20 06:05:04 2007 +0300
@@ -704,8 +704,9 @@
             tmps2 = var0->fieldref->value.string;
             
             while (result && *tmps2 != '\0') {
-              if (*tmps2 == ' ')
-                tmps2++;
+              gunichar uc = g_utf8_get_char(tmps2);
+              if (g_unichar_isspace(uc))
+                g_utf8_next_char(tmps2);
               else
                 result = FALSE;
             }