From 8c25b6f2f48da4a7fd7d18a275cc5f18831ef992 Mon Sep 17 00:00:00 2001 From: Mikkel Kirkgaard Nielsen Date: Thu, 26 Oct 2017 18:51:04 +0000 Subject: [PATCH] Fix encoding of redmine usernames Encode usernames in labels of user_* graphs using 8859-1 encoding as Munin expects. Refer also to https://github.com/saily/redmine_stats/issues/2. --- redmine_stat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redmine_stat.py b/redmine_stat.py index 731f442..7ff8acd 100644 --- a/redmine_stat.py +++ b/redmine_stat.py @@ -105,8 +105,8 @@ def config(self): def row(item): print "_v%s.label %s %s" % (item[3], - unicode(item[1]).encode("utf-8"), - unicode(item[2]).encode("utf-8")) + unicode(item[1]).encode("iso-8859-1"), + unicode(item[2]).encode("iso-8859-1")) print "_v%s.draw AREASTACK" % (item[3]) self._result(row)