From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: garbage chars when pasting French chars into emacs Date: Wed, 01 Feb 2012 21:39:22 -0500 Message-ID: <4F29F75A.9070301@mousecar.com> References: <4F29A386.5040901@mousecar.com> <83ty3ap7t1.fsf@gnu.org> Reply-To: gebser@mousecar.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328150390 4334 80.91.229.3 (2 Feb 2012 02:39:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2012 02:39:50 +0000 (UTC) To: GNU Emacs List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 03:39:49 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 1RsmaM-0007I1-O8 for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Feb 2012 03:39:42 +0100 Original-Received: from localhost ([::1]:44373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsmaL-00082V-Mo for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Feb 2012 21:39:41 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsmaG-00081h-Bj for help-gnu-emacs@gnu.org; Wed, 01 Feb 2012 21:39:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsmaE-00046U-VE for help-gnu-emacs@gnu.org; Wed, 01 Feb 2012 21:39:36 -0500 Original-Received: from mout.perfora.net ([74.208.4.195]:63788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsmaE-00046G-OG for help-gnu-emacs@gnu.org; Wed, 01 Feb 2012 21:39:34 -0500 Original-Received: from dellap.mousecar.net (dsl093-011-016.cle1.dsl.speakeasy.net [66.93.11.16]) by mrelay.perfora.net (node=mrus4) with ESMTP (Nemesis) id 0Lgq1W-1SP2GL2fH4-00oFFm; Wed, 01 Feb 2012 21:39:32 -0500 User-Agent: Thunderbird 2.0.0.24 (X11/20111109) In-Reply-To: <83ty3ap7t1.fsf@gnu.org> X-Provags-ID: V02:K0:8EQ9rwx9gW6o931whxOOceLaI5bwLphAXU1Wv57ePeW 83YzEuxnNj52VMcRqVaPBLOgTfL9ANaBsey6jl7tyGJs4RsHh/ 6SRYtTGvzng4znGrvP8oIp2vKMV8FaxfUT7N8T3xPT7o1Liv2/ zkoPX3tshWTfxxP4f3VqugIpX/F6uptcLJxA9KOzVIdz2ezWi1 D/4NWkcwCO/+lTByBZHQVlLadI+oi0ZApMv0nahQa+bUYnsCz8 QzbI+GDJYUQx2IFl4ZjmOHTvOycCYHaFjQ3lhirqcsXeDAKpM/ 9h2MDXMVXX+k/GqNZMVQiHupuXgj3jlJ8pf3KaXuCgfoG6EocF ZekdJNivezZwQxMedlDnkiP9qbCbxhupsrFmzJXAk X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.208.4.195 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:83580 Archived-At: On 02/01/2012 04:23 PM Eli Zaretskii wrote: >> Date: Wed, 01 Feb 2012 15:41:42 -0500 >> From: ken >> >> Just to be comprehensive I'll state at the outset that I'm using Linux >> (CentOS 5.7), so this is the environment emacs is working in. From a >> shell I get this: >> >> $ set|grep -i lang >> LANG=en_US.UTF-8 >> >> Now I pull up a webpage with some French on it: >> . Examining the >> source code of this page, I see at the top: >> >> >> >> So this page is presented in UTF-8. >> >> Firefox is also set to present pages in UTF-8: View -> Character >> Encoding -> UTF-8 >> >> But when I copy and paste the text from "Francais" to "invisible, 1964)" >> inclusive, many of the characters aren't rendered correctly; I get >> "garbage" characters in their stead, e.g., the second-to-last line >> appears something like this: >> >> * L^[$(B!G^[$(C)+^[(Bil et l^[$(B!G^[(Besprit, Gallimard, 1960 >> >> Other lines are improperly rendered also. >> >> I'd like to fix this. And if possible understand why this doesn't work, >> so I might be able to diagnose these problems for myself. > > What is your value of selection-coding-system? Try setting it to > something like ctext-with-extensions. Thanks, Eli, Immediately prior to doing the copy-and-paste I ran all of these: (set-language-environment 'UTF-8) (set-default-coding-systems 'utf-8) (setq file-name-coding-system 'utf-8) (setq default-buffer-file-coding-system 'utf-8) (setq coding-system-for-write 'utf-8) (set-keyboard-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-clipboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (prefer-coding-system 'utf-8) (modify-coding-system-alist 'process "\\*shell\\*\\'" 'utf-8-unix) 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. So we're a lot closer.... Got another suggestion?