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

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

Re: python mode shell and unicode


From: Max Arnold
Subject: Re: python mode shell and unicode
Date: Sun, 28 Mar 2010 20:08:22 +0700
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Mar 28, 2010 at 09:25:02AM +0200, Andreas Röhler wrote:
> Hmm, see inside `python-send-region'
> 
>   ;; Fixme: Write a `coding' header to the temp file if the region is
>   ;; non-ASCII.
> 
> Maybe that indicates the cause?

I think this is unrelated to the issue because my python code contains no
unicode characters; they are received from parsed web page and then printed
to stdout. The problem is with python process spawned by Emacs - its stdout
encoding is not specified (sys.stdout.encoding is None).

Maybe this is a python feature: 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415968

But then I do not understand why manually invoked pyton-shell handles unicode
characters just fine...

> You could try `py-execute-file' from python-mode.el

Sorry, didn't mentioned that I use python.el shipped with emacs. How to disable
built-in one and enable python-mode.el?  How to invoke py-execute-file from
M-x prompt?

BTW, print u'\xA9' is a nice test for this issue.

Cheers, Max




reply via email to

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