[Tutor] Encoding

Giorgio anothernetfellow at gmail.com
Sat Mar 6 18:27:41 CET 2010

2010/3/5 Dave Angel <davea at ieee.org>

I'm not angry, and I'm sorry if I seemed angry.  Tone of voice is hard to
> convey in a text message.

Ok, sorry. I've misunderstood your mail :D

> I'm still not sure whether your confusion is to what the rules are, or why
> the rules were made that way.

WHY the rules are made that way. But now it's clear.

2010/3/6 Mark Tolonen <metolone+gmane at gmail.com <metolone%2Bgmane at gmail.com>

>  Maybe this will help:
>   # coding: utf-8
>   a = "ciao è ciao"
>   b = u"ciao è ciao".encode('latin-1')
> a is a UTF-8 string, due to #coding line in source.
> b is a latin-1 string, due to explicit encoding.

Oh, right. And, if i'm not wrong B is an UTF8 string decoded to unicode (due
to the coding: statement at the top of the file) and re-encoded to latin1

> -Mark

Thankyou again


Email: anothernetfellow at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100306/e4ce4744/attachment.html>

More information about the Tutor mailing list