[Answered ]-Django character encoding

1👍

Turns out this is likely due to the FreeTDS layer that connects to the SQL Server. While FreeTDS provides some support for automatically converting encodings, my setup is either misconfigured or otherwise not working quite right.

Rather than fighting this battle, I’ve migrated to MySQL for now.

1👍

The issue here is that in unicode you use the following line:

label += " ({0})".format(blocking_msg)

And unfortunately in python 2.x this is trying to format blocking_msg as an ascii string. What you meant to type was:

label += u" ({0})".format(blocking_msg)

Leave a comment