[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é <nfdisco@gmail.com>
>
> 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)?
- python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Andreas Röhler, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Andreas Röhler, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Peter Dyballa, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?,
Eli Zaretskii <=
- Re: python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Eli Zaretskii, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Peter Dyballa, 2013/10/29
- Re: python-shell-send-region uses wrong encoding?, Ernest Adrogué, 2013/10/29
RE: python-shell-send-region uses wrong encoding?, Drew Adams, 2013/10/29