From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Characters saved mismatch? Date: Sun, 07 May 2017 10:07:39 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494166082 9960 195.159.176.226 (7 May 2017 14:08:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 May 2017 14:08:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 07 16:07:54 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 1d7Mqo-0002R5-E2 for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 16:07:54 +0200 Original-Received: from localhost ([::1]:55710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7Mqt-0008Hj-O9 for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 10:07:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7Mqo-0008He-0e for emacs-devel@gnu.org; Sun, 07 May 2017 10:07:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7Mqj-0001Qg-1m for emacs-devel@gnu.org; Sun, 07 May 2017 10:07:53 -0400 Original-Received: from [195.159.176.226] (port=59281 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7Mqi-0001Q0-Rw for emacs-devel@gnu.org; Sun, 07 May 2017 10:07:48 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d7Mqa-0002DY-PB for emacs-devel@gnu.org; Sun, 07 May 2017 16:07:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:FQ9TNyHCxZZMXDbu8ik6ssZgsJw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:214671 Archived-At: >> As written about emacs sees the newline as just 1 character. > But all this is confusing when the end line is utf-8-dos... What's confusing about it? The line separator is a character, just like the non-breaking space is a character. The coding system then encodes those as some number of bytes, typically 1 or 2 (e.g. using utf-8-dos, they will both use up 2 bytes, IIRC, whereas with latin-1-unix they'd both use up a single byte, and of course you get other combinations with latin-1-dos and utf-8-unix, and I'll let you check what can happen with things like iso-2022-7bit). Stefan