diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-05-20 16:34:13 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-05-20 16:34:13 +0000 |
commit | 4865d10128a2d1734283bd58d3205e42f8c6a99b (patch) | |
tree | 7fc2a23f23c0dc4b5c3d255166fd042b3383c3b3 | |
parent | a466ebeb422aff55a1a447abf212dd7c66caeaa7 (diff) |
convert song name from locale to UTF8 before passing it to the server
git-svn-id: file:///home/lennart/svn/public/xmms-pulse/trunk@39 ef929aba-56e2-0310-84e0-b7573d389508
-rw-r--r-- | src/plugin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c index 47b93c7..1c95225 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -71,14 +71,15 @@ gint ctrlsocket_get_session_id(void); static const char* get_song_name(void) { static char t[256]; gint session, pos; - char *str; + char *str, *u; session = ctrlsocket_get_session_id(); pos = xmms_remote_get_playlist_pos(session); if (!(str = xmms_remote_get_playlist_title(session, pos))) return "Playback Stream"; - snprintf(t, sizeof(t), "%s", str); + snprintf(t, sizeof(t), "%s", u = pa_locale_to_utf8(str)); + pa_xfree(u); return t; } |