[Top][All Lists]

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

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

From: Eli Zaretskii
Subject: Re: python-shell-send-region uses wrong encoding?
Date: Tue, 29 Oct 2013 19:15:03 +0200

> Date: Tue, 29 Oct 2013 17:34:26 +0100
> From: Ernest Adrogué <address@hidden>
> The "ö" character is stored in the file as 0xC3 0xB6. As you say, this is
> the UTF-8 encoding for this character.
> The Python interpreter interprets the 2-byte sequence correctly.  This can
> be seen in a number of ways: if I run the script in a terminal, or if I
> paste or yank the line into Python shell buffer, or I do
> python-shell-send-buffer, in all these cases the sequence is converted into
> 0xF6, which is the UTF-16 encoding for "ö" that Python uses internally, as
> the output from repr() shows..
> However, when the bytes are sent with python-shell-send-region, the
> interpeter thinks that 0xC3 0xB6 are 2 characters, which is wrong.  In light
> of this, I would say that there is a bug in python-shell-send-region.

Why is that a bug, and what would you expect python-shell-send-region
to send instead (and why)?

reply via email to

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