aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_search.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-07 16:14:39 +0100
committerMax Kellermann <max@duempel.org>2008-11-07 16:14:39 +0100
commitc238364f6833320fee4256226af650347d5a751b (patch)
treec04fbb8f91e34dea95410290b941bee627e66c18 /src/screen_search.c
parent06aafa1328f50d247676c2eca488e53fa02c0dbd (diff)
downloadmpd-c238364f6833320fee4256226af650347d5a751b.tar.gz
mpd-c238364f6833320fee4256226af650347d5a751b.tar.xz
mpd-c238364f6833320fee4256226af650347d5a751b.zip
mpdclient: expect UTF-8 strings
Don't convert the character set of strings to and from the current locale. This library cannot know what the strings are going to be used for, so it should not mess with them.
Diffstat (limited to '')
-rw-r--r--src/screen_search.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/screen_search.c b/src/screen_search.c
index 51a8a2966..7cb04e85f 100644
--- a/src/screen_search.c
+++ b/src/screen_search.c
@@ -180,15 +180,16 @@ filelist_search(mpdclient_t *c, mpd_unused int exact_match, int table,
gchar *local_pattern)
{
mpdclient_filelist_t *list, *list2;
+ gchar *filter_utf8 = locale_to_utf8(local_pattern);
if (table == SEARCH_ARTIST_TITLE) {
list = mpdclient_filelist_search(c, FALSE, MPD_TABLE_ARTIST,
- local_pattern);
+ filter_utf8);
if (list == NULL)
list = filelist_new(NULL);
list2 = mpdclient_filelist_search(c, FALSE, MPD_TABLE_TITLE,
- local_pattern);
+ filter_utf8);
if (list2 != NULL) {
filelist_move(list, list2);
filelist_free(list2);
@@ -196,11 +197,12 @@ filelist_search(mpdclient_t *c, mpd_unused int exact_match, int table,
filelist_sort(list, compare_filelistentry_format);
} else {
- list = mpdclient_filelist_search(c, FALSE, table, local_pattern);
+ list = mpdclient_filelist_search(c, FALSE, table, filter_utf8);
if (list == NULL)
list = filelist_new(NULL);
}
+ g_free(filter_utf8);
return list;
}