help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-mode, c-c c-c and unicode in output buffer


From: sandro dentella
Subject: Re: python-mode, c-c c-c and unicode in output buffer
Date: Sat, 24 Oct 2009 10:39:46 -0700 (PDT)
User-agent: G2/1.0

On 24 Ott, 17:33, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 24.10.2009 um 15:56 schrieb sandro dentella:
>
> > Traceback (most recent call last):
> >   File "<stdin>", line 2, in <module>
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in
> > position 0: ordinal not in range(128)
>
> This comes from Python!

agreed

>
> The reason is that you are *not* creating an UTF-8 encoded file,

mmh, python says it's trying to create an ascii coded string and it
can't write
char u'\xe8' in ascii.

> which you can notice from the message "character u'\xe8'" which means
> some 8-bit value, i.e., not Unicode.
on the contary, python perfectly knows which char it is, but tries to
encode in ascii.

> To achieve UTF-8 encoding you
> need to update the first line to real ELisp:
>
>         # coding: utf-8;
>
> The final delimiter is needed, I think...



No, this does not  change. In fact the buffer states it's already a
uft-8 encoded buffer.


sandro
*:-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]