bboe/reddit-modutils — pull request #1 by grischard (2012-04-10 12:11:23+00:00)
Title: Changed output to utf-8

When the text to be printed contains non-ascii characters, for example an é in flair text, modutils will crash:

./modutils.py -f bicycling
Traceback (most recent call last):
File "./modutils.py", line 243, in
sys.exit(main())
File "./modutils.py", line 232, in main
modutils.output_current_flair()
File "./modutils.py", line 145, in output_current_flair
flair['flair_css_class'])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 17: ordinal not in range(128)

This patch sets the output format to be UTF-8, which allows such characters without changing the output of text without special characters.