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

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

Re: python-shell-send-region uses wrong encoding?


From: Andreas Röhler
Subject: Re: python-shell-send-region uses wrong encoding?
Date: Wed, 30 Oct 2013 13:45:08 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0

Am 30.10.2013 13:08, schrieb Yuri Khan:
On Wed, Oct 30, 2013 at 6:37 PM, Stefan Monnier
<address@hidden> wrote:
IIUC the second added line "-*- coding: utf-8 -*-\n" should not be needed,
as that's the default at the Python side anyway.

Based on the OP's experience, it seems this is not true.
Also, the doc I can find indicates that the default is ASCII (and was
latin-1 in the past, which is what the OP seems to be seeing).

There is Python, and, on the other hand, there is Python.

In some GNU/Linux distributions (e.g. Ubuntu), the default Python is
version 2.x, whose default encoding is ASCII (and has been that way
since at least 2.6).

On the other hand, the current version of Python is 3.x, where a big
Unicode revolution has happened and now the default encoding is UTF-8.

Both of these Pythons recognize Emacs-style and vim-style encoding
declarations, and in addition the UTF-8 byte order mark (which can be
called Notepad-style encoding declaration).



Thanks clarifying this, so I stand corrected.

Andreas




reply via email to

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