diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 00:09:18 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 00:09:18 +0100 |
commit | 4847bbaad372c7c51811bafe2fdf3ffbf28d9a69 (patch) | |
tree | f3196fb261e2efa9d96d7e64bb7d6f00237f9d43 /src/dirvec.c | |
parent | b7fe09fa5221d89f5dc1aa4990a10498aa6b2f4b (diff) |
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/dirvec.c')
-rw-r--r-- | src/dirvec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dirvec.c b/src/dirvec.c index 774730382..8fa9cde77 100644 --- a/src/dirvec.c +++ b/src/dirvec.c @@ -19,7 +19,7 @@ static int dirvec_cmp(const void *d1, const void *d2) { const struct directory *a = ((const struct directory * const *)d1)[0]; const struct directory *b = ((const struct directory * const *)d2)[0]; - return strcmp(a->path, b->path); + return g_utf8_collate(a->path, b->path); } void dirvec_init(void) |