From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ernest =?iso-8859-1?Q?Adrogu=E9?= Newsgroups: gmane.emacs.help Subject: Re: python-shell-send-region uses wrong encoding? Date: Tue, 29 Oct 2013 21:48:00 +0100 Message-ID: <20131029204800.GB29712@doriath.local> References: <20131029113044.GA28039@doriath.local> <526FC58A.6080204@easy-emacs.de> <20131029145554.GB28671@doriath.local> <20131029163426.GA29055@doriath.local> <83ppqodmnc.fsf@gnu.org> <20131029175303.GA29272@doriath.local> <83k3gvevuo.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383079715 13991 80.91.229.3 (29 Oct 2013 20:48:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 20:48:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 29 21:48:39 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VbGDP-0001Zw-CM for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Oct 2013 21:48:39 +0100 Original-Received: from localhost ([::1]:49335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbGDO-00019N-PU for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Oct 2013 16:48:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbGD5-00017j-Nu for help-gnu-emacs@gnu.org; Tue, 29 Oct 2013 16:48:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbGCv-0005Oq-Gv for help-gnu-emacs@gnu.org; Tue, 29 Oct 2013 16:48:19 -0400 Original-Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:33426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbGCv-0005OY-6j for help-gnu-emacs@gnu.org; Tue, 29 Oct 2013 16:48:09 -0400 Original-Received: by mail-wg0-f47.google.com with SMTP id c11so429628wgh.14 for ; Tue, 29 Oct 2013 13:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=HTwP6w6lbViCUTMx8vHFoZ5H8APuxDs3300znxUP1YI=; b=ooaoGbYewvHEH6yFEDWfKXgMPKgw4Fd/rFReIXLA175TbDMb566WcEreo/W4AAYVpZ zyQjdYl813g9DxN/kWyirDKYJcHgCVGWZwEErwwenX+2z3bDzZmYMr5ZoB6DVsMiLZJt IarjU7iO+DGdc+g+4ERFU+IppEShzlFIOGY7puUcbqj33AJslTmk86+Sj6zKOgHLJu6M PE12LBpR/ie85hLfjDV2VUIFNDxOyYNQGfXgi26GNKSqoL84zo0vjb4iW3x7BihXrCFs ZYRNvUaRpabDL+1eugligpHW5EIqZeA+j91PDdBGAWFR2pnmXW0Wr77Bsi7iRzpkuVWJ G1ew== X-Received: by 10.194.77.80 with SMTP id q16mr1344097wjw.5.1383079688138; Tue, 29 Oct 2013 13:48:08 -0700 (PDT) Original-Received: from doriath (200.Red-83-58-146.dynamicIP.rima-tde.net. [83.58.146.200]) by mx.google.com with ESMTPSA id ey4sm8672236wic.11.2013.10.29.13.48.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 13:48:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <83k3gvevuo.fsf@gnu.org> X-Operating-System: GNU/Linux (Debian jessie/sid) User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22f X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94260 Archived-At: 29-10-2013, 21:10 (+0200); Eli Zaretskii escriu: > > Date: Tue, 29 Oct 2013 18:53:03 +0100 > > From: Ernest Adrogu=E9 > >=20 > > I would expect python-shell-send-region to be a shortcut for saving the > > region, switching to the shell buffer, yanking and hitting RET. >=20 > Emacs can send stuff to an inferior program directly, without going > through a file. >=20 > But even if going through a file, why is it wrong to send 2 bytes when > a character's UTF-8 encoding takes those same 2 bytes? It's not wrong to send 2 bytes, the problem was that you also have to tell Python the encoding. Anyway, it's fixed now. Thanks Stefan for the patch and everyone else for the help.