2

I am not sure why I am getting this error:

Exception Type: UnicodeEncodeError

Unicode error hint
The string that could not be encoded/decoded was: he Théâtre d

The full traceback is here: http://dpaste.com/686751/ (I put it in a dpaste due to it's length)

I am really confused about this because it works flawlessly on our staging and has been for a year or so now, it's finally on the live server, I copied over the database to the live server and now if I edit anything or add a new page with any sort of french accents I received the above error. I've been googling for hours with not much luck.

In my research I have found some issues with DB collation but I have tried to recreate the database as utf8_general_ci, and converted the tables respectively and still no luck. Any idea?

I should also note that the apps listed in the installed apps are one's we've developed and use for about 13 other live and large web sites on the same server and with the same types of characters.

baffled

Jeff

2

2 Answers 2

2

in model add u''

def __unicode__(self):
    return u"%s" % self.your_field
Sign up to request clarification or add additional context in comments.

1 Comment

This does not seem to answer the question, as the question seems deeper. It would return a different exception if this were the case.
1

maybe the servers have different library versions? afaik, the way to fix those errors is using the smart_unicode function in the unicode method in models, as mentioned here: django unicode encode/decode errors

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.