try to use unicode

Mikael B mback1 at
Sat Nov 20 08:49:59 CET 2010

Date: Sat, 20 Nov 2010 08:47:18 +0100
From: stefan.sonnenberg at
To: mback1 at
CC: python-list at
Subject: Re: try to use unicode


    Am 20.11.2010 06:53, schrieb Mikael B:


      I'm learning python. python 2.6.6 on ubuntu 10.10 I'm swedish so I
      try to use

      unicode to get swedish characters. I've checked wikipedia.

      utf-8 is said to be an unicode encoding..


      this is the test program:


      # -*- coding: utf-8 -*-


      import readline




      and this is the output:


      Traceback (most recent call last):

        File "", line 5, in <module>


      UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5'
      in position 1: ordinal not in range(128)


      I'm doing something wrong...




    Your console is not unicode ready.

    Please take a look at the locale command and vars like

    LC_ALL, LC_LANG etc.

Aha...      Ok,thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list