[Top][All Lists]

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

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

From: Yuri Khan
Subject: Re: python-shell-send-region uses wrong encoding?
Date: Wed, 30 Oct 2013 19:08:23 +0700

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).

reply via email to

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