aboutsummaryrefslogtreecommitdiffstats
path: root/src/songvec.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-15 00:09:18 +0100
committerMax Kellermann <max@duempel.org>2009-01-15 00:09:18 +0100
commit4847bbaad372c7c51811bafe2fdf3ffbf28d9a69 (patch)
treef3196fb261e2efa9d96d7e64bb7d6f00237f9d43 /src/songvec.c
parentb7fe09fa5221d89f5dc1aa4990a10498aa6b2f4b (diff)
downloadmpd-4847bbaad372c7c51811bafe2fdf3ffbf28d9a69.tar.gz
mpd-4847bbaad372c7c51811bafe2fdf3ffbf28d9a69.tar.xz
mpd-4847bbaad372c7c51811bafe2fdf3ffbf28d9a69.zip
dirvec, songvec: sort using g_utf8_collate()
Path names in the directory and song structs are always encoded in UTF-8. Don't use strcmp(), it cannot handle UTF-8 characters properly. Use GLib's UTF-8 aware g_utf8_collate() function for that.
Diffstat (limited to 'src/songvec.c')
-rw-r--r--src/songvec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/songvec.c b/src/songvec.c
index 17f60ab3b..929eaea47 100644
--- a/src/songvec.c
+++ b/src/songvec.c
@@ -14,7 +14,7 @@ static int songvec_cmp(const void *s1, const void *s2)
{
const struct song *a = ((const struct song * const *)s1)[0];
const struct song *b = ((const struct song * const *)s2)[0];
- return strcmp(a->url, b->url);
+ return g_utf8_collate(a->url, b->url);
}
static size_t sv_size(const struct songvec *sv)