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

That's going to fail if `v` contains non-ascii characters.
```
>>> v='\xef'
>>> unicode(v)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
```

I think you mean to do `unicode(v, 'utf-8')`