From 5cf91630a176e4720b121b2aa79bae4cb9188998 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 20 Apr 2013 02:33:08 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20d'encodage=20de=20car?= =?UTF-8?q?act=C3=A8res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/songs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/songs.py b/utils/songs.py index f8694e03..d9a71512 100644 --- a/utils/songs.py +++ b/utils/songs.py @@ -30,5 +30,8 @@ class beginsong(plasTeX.Command): # Parsing keyval arguments args = {} for (key, val) in self.attributes['args'].iteritems(): - args[key] = val.textContent.encode('utf-8') + if type(val) == unicode: + args[key] = val.encode('utf-8') + else: + args[key] = val.textContent.encode('utf-8') self.attributes['args'] = args