diff options
author | Max Kellermann <max@duempel.org> | 2008-09-23 13:41:49 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-23 13:41:49 +0200 |
commit | 3052dceb948336a0671f7bea24f8b378cae4ce30 (patch) | |
tree | b204deef7e9fe084316ab803547dd36df164fecb /lyrics/leoslyrics.py | |
parent | 3b68c580d50a22d6b0716948128cf359defab317 (diff) | |
download | mpd-3052dceb948336a0671f7bea24f8b378cae4ce30.tar.gz mpd-3052dceb948336a0671f7bea24f8b378cae4ce30.tar.xz mpd-3052dceb948336a0671f7bea24f8b378cae4ce30.zip |
lyrics: print text in UTF-8
Python defaults to sending ASCII characters, and aborts if there are
non-ASCII characters in the string. Unfortunately, due to "C.UTF-8"
being not defined, we cannot reliably make Python use UTF-8, without
further locale settings. Thus, work around this mess by manually
encoding the result to UTF-8 in the script.
Diffstat (limited to 'lyrics/leoslyrics.py')
-rwxr-xr-x | lyrics/leoslyrics.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lyrics/leoslyrics.py b/lyrics/leoslyrics.py index 0cee65aee..1e8975910 100755 --- a/lyrics/leoslyrics.py +++ b/lyrics/leoslyrics.py @@ -65,4 +65,4 @@ def lyrics(hid): hid = search(argv[1], argv[2]) if hid is None: exit(2) -print lyrics(hid) +print lyrics(hid).encode('utf-8') |