Skip to content

Instantly share code, notes, and snippets.

@dfm
Created August 12, 2012 18:59
Show Gist options
  • Select an option

  • Save dfm/3333747 to your computer and use it in GitHub Desktop.

Select an option

Save dfm/3333747 to your computer and use it in GitHub Desktop.
Argh...
>>> str("weiß")
'wei\xc3\x9f'
>>> str(u"weiß")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 3: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment