August 19th, 2003, 10:34 AM
I'm using the following code:
The output looks like:
"""whole degrees (\xb0)"""
whole degrees (░)
UnicodeError: UTF-8 decoding error: unexpected code byte
I'm having to use '\xb0' for the degree symbol because the program does not support the symbol itself. Can anyone help with this error? Why does the eval(...) function return the box-like symbol? How can I get around this???
August 19th, 2003, 03:33 PM
A box is usually the a unrecognised char. This is probably something to do with switching between encoding types. Why are you using eval?
It seems to me that you are just setting strUnquoted to the value strUTF8. If so then you could just do strUnquoted = strUTF8.. you should probably make sure that \xb0 is the degree sign if your not 100% sure.
Python's output by default is ascii, this could also be a reason why you are getting a box?
Hope this is of some help,