While attempting to render a template I'm getting the following error:
DjangoUnicodeDecodeError: 'utf8' codec can't decode bytes in position 26-27: invalid data. You passed in '\xce\x88\xce\xbe\xce\xbf\xce\xb4\xce\xb1 \xcf\x83\xcf\x84\xce\xb7\xce\xbd \xce\xb5\xcf\x81\xce\xb3\xce...' (<type 'str'>)
The template is fairly large and complex, so I'm hoping for some tips on how to track down where exactly this is coming from.
A few facts that might be helpful:
- The template is generally unicode friendly; we display a fair amount of unicode data through it
- The mysql table the data is coming from has utf8 encoding
- This is a strange one: The error doesn't show up on my staging server when using the same code base and the same production data. The setup is very similar to the production server: Python 2.5.1, Django-1.1.1, mysql 5.0.38, ubuntu.
I'm not sure where exactly to look for the badly encoded data, any hints or pointers would be appreciated.