From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tiphaine Turpin Newsgroups: gmane.emacs.bugs Subject: bug#10919: emacs-mule/utf-8 difference Date: Thu, 01 Mar 2012 16:39:57 +0100 Message-ID: <4F4F984D.2000901@inria.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330616507 21467 80.91.229.3 (1 Mar 2012 15:41:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2012 15:41:47 +0000 (UTC) To: 10919@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 01 16:41:44 2012 Return-path: Envelope-to: geb-bug-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 1S388U-0007Je-SK for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Mar 2012 16:41:42 +0100 Original-Received: from localhost ([::1]:43604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S388T-0007M8-UY for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Mar 2012 10:41:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3885-0007JL-D7 for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:41:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S387y-0000zn-0E for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:41:16 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S387x-0000zj-T6 for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:41:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S387s-0003tJ-6Y for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:41:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tiphaine Turpin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Mar 2012 15:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10919 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133061646214952 (code B ref -1); Thu, 01 Mar 2012 15:41:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Mar 2012 15:41:02 +0000 Original-Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S387p-0003sq-Vv for submit@debbugs.gnu.org; Thu, 01 Mar 2012 10:41:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59911) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S387c-0003sP-AF for submit@debbugs.gnu.org; Thu, 01 Mar 2012 10:40:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3877-0000u1-SY for submit@debbugs.gnu.org; Thu, 01 Mar 2012 10:40:22 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:39075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3877-0000tw-PQ for submit@debbugs.gnu.org; Thu, 01 Mar 2012 10:40:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3871-0007Bo-LX for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:40:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S386r-0000my-L1 for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:40:11 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:30753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S386r-0000lv-FA for bug-gnu-emacs@gnu.org; Thu, 01 Mar 2012 10:40:01 -0500 X-IronPort-AV: E=Sophos;i="4.73,511,1325458800"; d="scan'208";a="146983133" Original-Received: from chercheurs2-217.saclay.inria.fr (HELO [193.55.250.217]) ([193.55.250.217]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 01 Mar 2012 16:39:57 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57420 Archived-At: Hi, I have a problem regarding coding systems: I'm using process-send-string to send substrings of a buffer through a socket, after setting the process encoding and decoding systems to emacs-mule. I expect the number of bytes written to match the byte-length of the substring as obtained by position-bytes, since the specification of position-bytes in emacs-devel is to always work with the emacs-mule encoding. From emacs-devel: "The byte sequence of a buffer after decoded is always in emacs-mule (in emacs-unicode-2 branch, it's utf-8). So, changing buffer-file-coding-system or any other coding-system-related variables doesn't affects position-bytes." However, this is not the case with 3bytes utf8 characters: position-bytes counts them as 3 bytes, but process-send-string wirtes 4 bytes. Setting the process coding systems for the socket to utf-8 solves the problem, but I don't think it will with other coding systems, even if I used buffer-file-coding-system instead, since position-bytes does not use it. What is the real expected behavior of these things, and how to make this correct ? Regards, Tiphaine Turpin