diff --git a/plugins/change.org/changeorg b/plugins/change.org/changeorg index 49398bbd..79e53a64 100755 --- a/plugins/change.org/changeorg +++ b/plugins/change.org/changeorg @@ -28,6 +28,8 @@ GPLv3 ''' from sys import argv, exit +import sys +import codecs from os import environ, path, umask import re import urllib.request @@ -73,7 +75,9 @@ if environ.get('MUNIN_PLUGSTATE') and write_cache: umask(0o077) with open(petition_cache_names, 'w') as outfile: json.dump(petition_titles, outfile) - + +# equivalent of passing PYTHONIOENCODING=utf-8 to munin +sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) if len(argv) > 1 and argv[1] == 'config': print('''graph_title change.org signature count