From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Emacs text bug Date: Thu, 31 Jan 2013 22:04:54 +0200 Message-ID: <83halxce55.fsf@gnu.org> References: <1359231827550-276577.post@n5.nabble.com> <46B884FF-9FFD-4EB2-86A0-8F2BEDAD1AC3@Web.DE> <1359240188569-276587.post@n5.nabble.com> <3ACFB558-8C4B-4342-B726-775F7A6099F5@Web.DE> <1359242635175-276591.post@n5.nabble.com> <7914BF7E-844F-4F8C-BBE7-7556ACBE861F@Web.DE> <1359654952628-276925.post@n5.nabble.com> <83mwvpchh3.fsf@gnu.org> <1359660527067-276942.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1359662719 20512 80.91.229.3 (31 Jan 2013 20:05:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jan 2013 20:05:19 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 31 21:05: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 1U10O2-00078h-Hq for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jan 2013 21:05:30 +0100 Original-Received: from localhost ([::1]:48453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10Nj-0001Tm-Uc for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jan 2013 15:05:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10Ne-0001Ql-QT for Help-gnu-emacs@gnu.org; Thu, 31 Jan 2013 15:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U10Nd-0002wA-SS for Help-gnu-emacs@gnu.org; Thu, 31 Jan 2013 15:05:06 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:36001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10Nd-0002qa-Ki for Help-gnu-emacs@gnu.org; Thu, 31 Jan 2013 15:05:05 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MHI00000AFTQO00@a-mtaout23.012.net.il> for Help-gnu-emacs@gnu.org; Thu, 31 Jan 2013 22:05:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MHI000ITAGFKZ90@a-mtaout23.012.net.il> for Help-gnu-emacs@gnu.org; Thu, 31 Jan 2013 22:05:04 +0200 (IST) In-reply-to: <1359660527067-276942.post@n5.nabble.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:88900 Archived-At: > Date: Thu, 31 Jan 2013 11:28:47 -0800 (PST) > From: drain >=20 > Now I see. This problem must have started when I copied an early 19= th > century letter into the buffer, and the characters did not translit= erate > properly into modern English. Whatever those characters were, they = turned > into circumflexed /a/ (=C3=A2), the pound sign (=C2=A3), and a (spe= cial) right double > quotation mark (=E2=80=9D). utf-8 apparently cannot handle these. UTF-8 certainly _can_ handle them. I suspect that these characters got copied as raw bytes instead. > But why would this prevent utf-8 from encoding the rest of the buff= er? Why > not just leave those three characters mangled, and display the rest > properly? It reverted fine; it just would not stay in utf-8 unless = I (1) > put the instruction at the top of the buffer or (2) deleted those s= pecial > characters. So the functionality appears to be there: Emacs just wo= uld not > accept it as a saved state (absent instruction at the top). Emacs auto-detects the encoding each time you visit a file, unless either the file (by the 'coding:' cookie) or you (by using "C-x RET c= ") tell it exactly how to decode the file.