[New-bugs-announce] [issue1092] Unexpected results in Tutorial about Unicode

Vizcaynot report at bugs.python.org
Mon Sep 3 05:36:47 CEST 2007

New submission from Vizcaynot:

When trying the tutorial example about unicode  I have:
>>> "Äpfel".encode('utf-8')
  File "<stdin>", line 1
SyntaxError: (unicode error) unexpected code byte

I live in a latin american country so I need to do:
>>> "Äpfel".decode('latin-1).encode('utf-8')
  File "<stdin>", line 1
but the indentation "     >>>" is new for me, so I attempt the next:
>>> a="Äpfel".decode('latin-1).encode('utf-8')
  File "<stdin>", line 1
    >>> a
>>> print (a)

Is this necessary to do correction to the tutorial? is this normal the 
presence of "   >>>" that appears indented once I assign the value to 
variable a?

components: Unicode
messages: 55598
nosy: Viscaynot
severity: normal
status: open
title: Unexpected results in Tutorial about Unicode
type: behavior
versions: Python 3.0

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list