Fix unicode issue in tutorial.

This commit is contained in:
Georg Brandl 2007-08-31 06:46:05 +00:00
parent 4afcfb4f00
commit c3f5bad778
1 changed files with 2 additions and 4 deletions

View File

@ -445,10 +445,8 @@ To convert a string into a sequence of bytes using a specific encoding,
string objects provide an :func:`encode` method that takes one argument, the
name of the encoding. Lowercase names for encodings are preferred. ::
>>> "äÃ\u0020Ã".encode('utf-8')
b'A*A A'
.. % above example needs beefing up by a unicode dude
>>> "Äpfel".encode('utf-8')
b'\xc3\x84pfel'
.. _tut-lists: