Skip to content

Instantly share code, notes, and snippets.

@odarbelaeze
Created June 28, 2013 05:54
Show Gist options
  • Save odarbelaeze/5882731 to your computer and use it in GitHub Desktop.
Save odarbelaeze/5882731 to your computer and use it in GitHub Desktop.
Interactive Django shell, showing how a bad unicode data error can be inserted.
In [1]: from ublog.models import Entry
In [2]: a = Entry.objects.get()
In [3]: a
Out[3]: <Entry: El título pero mas fuerte>
In [4]: a.title = "The title with more ñame"
In [5]: a.save()
In [6]: a
Out[6]: <Entry: [Bad Unicode data]>
In [7]: a.title = u"The title with more ñame"
In [8]: a.save()
In [9]: a
Out[9]: <Entry: The title with more ñame>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment