From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: Characters saved mismatch? Date: Sun, 7 May 2017 11:15:39 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: Quoted-Printable X-Trace: blaine.gmane.org 1494148565 21689 195.159.176.226 (7 May 2017 09:16:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 May 2017 09:16:05 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 Cc: Emacs developers To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 07 11:15:58 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7III-0005Uo-CY for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 11:15:58 +0200 Original-Received: from localhost ([::1]:54235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7IIN-0004se-FM for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 05:16:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7IIB-0004sN-5u for emacs-devel@gnu.org; Sun, 07 May 2017 05:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7II6-0007t6-8o for emacs-devel@gnu.org; Sun, 07 May 2017 05:15:51 -0400 Original-Received: from smtp204.alice.it ([82.57.200.100]:64802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7II5-0007t0-TZ for emacs-devel@gnu.org; Sun, 07 May 2017 05:15:46 -0400 Original-Received: from [192.168.1.102] (79.35.224.245) by smtp204.alice.it (8.6.060.43) (authenticated as angelo.graziosi@alice.it) id 58C423FB222429C7; Sun, 7 May 2017 11:15:45 +0200 In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.100 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214655 Archived-At: Il 07/05/2017 10:56, Yuri Khan ha scritto: > On Sun, May 7, 2017 at 6:27 AM, Angelo Graziosi > wrote: >=20 >> Wrote =E2=80=98c:/msys64/tmp/foo.text=E2=80=99 (8 characters) >> >> but >> >> ls -l foo.text >> -rw-r--r-- 1 bingo bongo 10 7 mag 01.07 foo.text >> >> 10 bytes! >=20 > You are comparing a character count against a byte count. Well *of > course* they are going to be different. The assumption =E2=80=9Cone cha= racter > is encoded by one byte=E2=80=9D has been false for quite a while now. >=20 Someone should explain the meaning of "Wrote =E2=80=98c:/msys64/tmp/foo.t= ext=E2=80=99 (8=20 characters)". If it refers to the number of characters, my example contains 6=20 characters: f-o-o-b-a-r and not 8. As I wrote, in Windows Emacs uses DOS style, more precisely 'utf-8-dos'.=20 That should mean 1 byte/ch and CR+LF for end line (RET). This mean that foo RET bar RET should contain (3+2) * 2 =3D 10 bytes as, 'ls' shows.. Then, where does "Wrote =E2=80=98c:/msys64/tmp/foo.text=E2=80=99 (8 chara= cters)" came=20 from, on Windows?