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: garbage chars when pasting French chars into emacs Date: Fri, 03 Feb 2012 09:31:10 +0200 Message-ID: <83ipjofk5d.fsf@gnu.org> References: <4F29A386.5040901@mousecar.com> <83ty3ap7t1.fsf@gnu.org> <4F29F75A.9070301@mousecar.com> <83pqdxq47t.fsf@gnu.org> <4F2AEB65.2080404@mousecar.com> NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1328254415 14888 80.91.229.3 (3 Feb 2012 07:33:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2012 07:33: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 Fri Feb 03 08:33:35 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtDeJ-0004ES-0u for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 08:33:35 +0100 Original-Received: from localhost ([::1]:37449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDeH-0003jX-0N for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 02:33:33 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDe9-0003jK-Dn for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:33:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtDe3-0006j6-Cm for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:33:25 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:38423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDe3-0006iy-6e for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:33:19 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LYT00D003HUXK00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 09:33:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.37.111]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYT00DZZ3N5PS60@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 09:33:06 +0200 (IST) In-reply-to: <4F2AEB65.2080404@mousecar.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 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:83597 Archived-At: > Date: Thu, 02 Feb 2012 15:00:37 -0500 > From: ken > > >> Following your advice, I ran > >> > >> (set-selection-coding-system 'ctext-with-extensions) > >> > >> and then did the same copy-and-paste again. This got more of the > >> characters correct, but not all of them. > > Looking again, I see my eyes must have been malfunctioning for the text > pasted into emacs is rendered correctly. However, when I try to save > the text, I'm presented with the minibuffer message "Select coding > system (default iso-2022-jp-2): ". At the same time a second buffer > opens under the first giving the options for coding system: > > =================================================================== > These default coding systems were tried: > mule-utf-8-unix iso-latin-1 > However, none of them safely encodes the target text. > > Select one of the following safe coding systems: > iso-2022-jp-2 x-ctext iso-2022-7bit raw-text emacs-mule no-conversion > ctext-no-compositions iso-2022-8bit-ss2 iso-2022-7bit-lock > iso-2022-7bit-ss2 tibetan-iso-8bit-with-esc thai-tis620-with-esc > lao-with-esc korean-iso-8bit-with-esc hebrew-iso-8bit-with-esc > greek-iso-8bit-with-esc iso-latin-9-with-esc iso-latin-8-with-esc > iso-latin-5-with-esc iso-latin-4-with-esc iso-latin-3-with-esc > iso-latin-2-with-esc iso-latin-1-with-esc > in-is13194-devanagari-with-esc cyrillic-iso-8bit-with-esc > chinese-iso-8bit-with-esc japanese-iso-8bit-with-esc > =================================================================== > > Entering "utf-8" into the minibuffer, of course, doesn't work. Frankly, > I'd like to save into utf-8 You can't, not with Emacs 21. In that version, the same character in different character sets was treated as 2 different characters. Also, the mule-utf-8 character set didn't include the Latin-1 characters. The only suggestion I have is to try iso-latin-1-with-esc (you will see above that this is one of the possibilities suggested by Emacs), it should at least produce a Latin-1 encoded file, which will be easier on you later. You really need to upgrade your Emacs, if you want to use UTF-8.