From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tech Stuff Newsgroups: gmane.emacs.help Subject: Re: File Encoding Issue on Windows Date: Wed, 13 Mar 2013 10:44:54 -0700 (PDT) Message-ID: <1363196694.77456.YahooMailNeo@web165002.mail.bf1.yahoo.com> References: <1363057726.11242.YahooMailNeo@web165001.mail.bf1.yahoo.com> <1363100259.90696.YahooMailNeo@web165001.mail.bf1.yahoo.com> <87a9q8shoe.fsf@riseup.net> Reply-To: Tech Stuff NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="1522496447-148018082-1363196694=:77456" X-Trace: ger.gmane.org 1363196724 4741 80.91.229.3 (13 Mar 2013 17:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 17:45:24 +0000 (UTC) To: "W. Greenhouse" , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 13 18:45:47 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 1UFpkI-0001e7-Ah for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Mar 2013 18:45:46 +0100 Original-Received: from localhost ([::1]:38534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFpjv-0007uP-Tt for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Mar 2013 13:45:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFpjg-0007rt-In for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:45:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFpjW-00038F-1Q for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:45:08 -0400 Original-Received: from nm5.bullet.mail.bf1.yahoo.com ([98.139.212.164]:21711) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UFpjV-00036d-R1 for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:44:57 -0400 Original-Received: from [98.139.212.146] by nm5.bullet.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 17:44:55 -0000 Original-Received: from [98.139.212.218] by tm3.bullet.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 17:44:55 -0000 Original-Received: from [127.0.0.1] by omp1027.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 17:44:55 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 685799.77230.bm@omp1027.mail.bf1.yahoo.com Original-Received: (qmail 86074 invoked by uid 60001); 13 Mar 2013 17:44:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1363196695; bh=IKAwWPBiIoHVV3IU0B4jc1yMNAsNvBOV4mHNmg+VR6w=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=HTs7zPC75YIPZk9yXTHv2YR//EPyPZpDjPRpL+fcDypoESa11aSyaiq5BwH1BuS4SF+qpQRGJQI6Pmk9IxlATK9q/5t37pOu8jxr1z2YsXwGSqMJWTqYyBxX41gqHzbrE05G1zsKjF1v6WjMWzjeBt/tvaWOOzNmalR+psgTMNg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=S3ug7bmcnU7G/Q0slOGgB6JtF9XaEStAOJr8+QEwVk6FBAOpkFUwMM+zrlOl6X5ANnjTahD7owZt5z1iJwqhq3vISg5lSu9b1ri42BJRvTbe0K/D8I15OItY4ktN+hBH8ygomOHgQWkDNr03U2z0jNLu9T13Zl9ZuD2z0ffYYD8=; X-YMail-OSG: lYIhKmgVM1nbBXQxRtvug_71PDAb_D2PoFatgqqUbMxe3uf kV2FL2rCVCpClGsXzmtYc Original-Received: from [98.145.41.146] by web165002.mail.bf1.yahoo.com via HTTP; Wed, 13 Mar 2013 10:44:54 PDT X-Rocket-MIMEInfo: 002.001, VGhhbmtzIGZvciB0aGF0LsKgIEkndmUgdGFrZW4geW91ciBzdWdnZXN0aW9ucyBhbmQgYWRkZWQgdGhlIGxpbmUgc3VnZ2VzdGVkIGJ5IGVsaSBpbiBhIHNlcGFyYXRlIGVtYWlsLsKgIE15IC5lbWFjcyBsb29rcyBsaWtlIHRoaXMgbm93OgoKLy8gYmVpbmcgLmVtYWNzCihtZXNzYWdlICJUUzE5NzEgSGVsbG8gV29ybGQgZnJvbSAuZW1hY3MiKQoKKHNldHEgbG9jYWxlLWNvZGluZy1zeXN0ZW0gJ3V0Zi04KQooc2V0LXRlcm1pbmFsLWNvZGluZy1zeXN0ZW0gJ3V0Zi04KQooc2V0LWtleWJvYXJkLWNvZGluZy0BMAEBAQE- X-Mailer: YahooMailWebService/0.8.137.519 In-Reply-To: <87a9q8shoe.fsf@riseup.net> X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 98.139.212.164 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:89511 Archived-At: --1522496447-148018082-1363196694=:77456 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for that.=A0 I've taken your suggestions and added the line suggeste= d by eli in a separate email.=A0 My .emacs looks like this now:=0A=0A// bei= ng .emacs=0A(message "TS1971 Hello World from .emacs")=0A=0A(setq locale-co= ding-system 'utf-8)=0A(set-terminal-coding-system 'utf-8)=0A(set-keyboard-c= oding-system 'utf-8)=0A(set-selection-coding-system 'utf-8)=0A(prefer-codin= g-system 'utf-8)=0A=0A(setq-default buffer-file-coding-system 'utf-8)=0A// = end .emacs=0A=0AI also upgraded to version - GNU Emacs 24.2.1 (i386-mingw-n= t5.1.2600) of 2012-08-28 on MARVIN.=A0 Someone had earlier mentioned someth= ing about version 24.3 but 24.2 was the newest I saw on the GNU download si= te.=A0 In any event, I'm hoping that these .emcas settings will solve my pr= oblems going forward.=A0 =0A=0AI'm still a bit stuck though with trying to = use global search-replace to fix the files that are already hosed.=A0 Here = again is an example of the error I'm trying to fix:=0A=0A=0A=0A=C2=BFCu=C3= =A1ntos d=C3=ADas se quedaron?=0A=0A=0Awhere I obviously want to repalce '= =C2=BF' with '=BF' and '=C3=AD' with '=ED'. Doug suggested earlier that I l= earn about input methods and I've spent some time reading about them but I = still don't know how to accomplish what I'm trying to do.=A0 For instance d= escribe-char tells me that the first character is codepoint 194.=A0 Given t= hat, how do I know which of the input methods I need to use to enter the ch= aracter?=A0 Also a probably related question.=A0 I enter the group of exten= ded characters neccesary for spanish by toggling on the MS International Ke= yboard layout.=A0 So in order to enter '=E9' for instance I type the sequen= ce ''e' - that is a single quote followed by an 'e'.=A0 This just works eve= rywhere, including in the emacs edit buffer.=A0 It doesn't work however in = the emacs mini-buffer when I try to do search-replaces.=A0 What's the solut= ion here?=A0 I suppose that it's input methods again, but again, I have no = idea which input method I should be choosing.=A0 =0A=0ACan someone point me= in the right direction here?=0A=0AThanks.=0A=0A=0A=0A=0A__________________= ______________=0A From: W. Greenhouse =0ATo: help-g= nu-emacs@gnu.org =0ASent: Tuesday, March 12, 2013 9:32 AM=0ASubject: Re: Fi= le Encoding Issue on Windows=0A =0AHi,=0A=0ATech Stuff writes:=0A=0A> Hi Peter,=0A>=0A> Thanks for taking the time to reply.= =A0 Though it was useful, I'm still=0A> confused about how to resolve this = issue.=A0 To be clear, when I posted=0A> yesterday, it was in emacs that I = was seeing the extraneous=0A> characters, not in notepad.=A0 However I just= opened it again in=0A> notepad to check on the encoding and now I'm seeing= the extra=0A> characters there as well.=A0 So something must have changed = when as=0A> part of trying to figure out what was going on, I saved the fil= e in=0A> Emacs.=A0 Emacs seems to be the culprit.=A0 Is there something tha= t I can=0A> put in my .emacs to tell it to save automatically in utf-8?=A0 = Or am I=0A> maybe still not understanding things.=0A>=0A> Thanks again.=0A>= =0A> -ts1971 =0A=0AThe following should unequivocally set utf-8 in all rele= vant contexts:=0A=0A(setq locale-coding-system 'utf-8)=0A(set-terminal-codi= ng-system 'utf-8)=0A(set-keyboard-coding-system 'utf-8)=0A(set-selection-co= ding-system 'utf-8)=0A(prefer-coding-system 'utf-8)=0A=0AThe above is teste= d by me only as far back as Emacs 23.=A0 On an unrelated=0Anote, however, y= ou should consider upgrading if you possibly can;=0Aaccording to http://www= .gnu.org/software/emacs/#Releases the newest=0AEmacs 22 is nearly 5 years o= ld already.=0A=0A=0A-- =0ARegards,=0AWGG --1522496447-148018082-1363196694=:77456 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for that. = ; I've taken your suggestions and added the line suggested by eli in a sepa= rate email.  My .emacs looks like this now:

// being .emacs
= (message "TS1971 Hello World from .emacs")

(setq locale-coding-syste= m 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-sy= stem 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-syst= em 'utf-8)

(setq-default buffer-file-coding-system 'utf-8)
// end= .emacs

I also upgraded to version - GNU Emacs 24.2.1 (i386-mingw-nt= 5.1.2600) of 2012-08-28 on MARVIN.  Someone had earlier mentioned some= thing about version 24.3 but 24.2 was the newest I saw on the GNU download = site.  In any event, I'm hoping that these .emcas settings will solve = my problems going forward. 

I'm still a bit stuck though with trying to use global search-replace to fix the files that are already= hosed.  Here again is an example of the error I'm trying to fix:
<= br>
=C2=BFCu=C3=A1ntos d=C3=ADas se quedaron?
=

where I obviously want to repalce '=C2=BF' with= '=BF' and '=C3=AD' with '=ED'. Doug suggested earlier that I = learn about input methods and I've spent some time reading about them but I= still don't know how to accomplish what I'm trying to do.  For instan= ce describe-char tells me that the first character is codepoint 194.  = Given that, how do I know which of the input methods I need to use to enter= the character?  Also a probably related question.  I enter the group= of extended characters neccesary for spanish by toggling on the MS Interna= tional Keyboard layout.  So in order to enter '=E9' for instance I typ= e the sequence ''e' - that is a single quote followed by an 'e'.  This= just works everywhere, including in the emacs edit buffer.  It doesn'= t work however in the emacs mini-buffer when I try to do search-replaces.&n= bsp; What's the solution here?  I suppose that it's input methods agai= n, but again, I have no idea which input method I should be choosing. =

Can someone point me in the right direction here?

Thanks.



From: W. Greenhouse <wgreenhouse= @riseup.net>
To: he= lp-gnu-emacs@gnu.org
Sent: Tuesday, March 12, 2013 9:32 AM
Subject: Re: File Encoding Issue on Windows

=0AHi,

Tech Stuff <techstuff1971@yahoo.com= > writes:

> Hi Peter,
>
> Thanks for taking the ti= me to reply.  Though it was useful, I'm still
> confused about h= ow to resolve this issue.  To be clear, when I posted
> yesterda= y, it was in emacs that I was seeing the extraneous
> characters, not= in notepad.  However I just opened it again in
> notepad to che= ck on the encoding and now I'm seeing the extra
> characters there as= well.  So something must have changed when as
> part of trying = to figure out what was going on, I saved the file in
> Emacs.  E= macs seems to be the culprit.  Is there something that I can
> p= ut in my .emacs to tell it to save automatically in utf-8?  Or am I> maybe still not understanding things.
>
> Thanks again.
>
> -ts1971

The following should unequivocally = set utf-8 in all relevant contexts:

(setq locale-coding-system 'utf-= 8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'u= tf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf= -8)

The above is tested by me only as far back as Emacs 23.  On= an unrelated
note, however, you should consider upgrading if you possib= ly can;
according to http://www.gnu.org/software/emacs/#Releases the new= est
Emacs 22 is nearly 5 years old already.


--
Regards,WGG




--1522496447-148018082-1363196694=:77456--