fix bug 1045303 - handle UTF-8 and control codes consistently

How did you come up with that? When I typed it, it became something else:
```python
>>> u'☢'
u'\u2622'
```
And I know that works because I used `codecs.open('/tmp/unicode.txt','w','utf8')` to write that and then it works on the terminal:
```
$ cat /tmp/unicode.txt
☢
```