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 16:26:39 -0700 (PDT) Message-ID: <1363217199.31399.YahooMailNeo@web165001.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> <1363196694.77456.YahooMailNeo@web165002.mail.bf1.yahoo.com> <07F09555-8B22-49CD-903D-2462D7A05BE2@Web.DE> <1363209104.14949.YahooMailNeo@web165005.mail.bf1.yahoo.com> <4E301087-AEB5-4214-B6BB-C52DA31DE339@Web.DE> Reply-To: Tech Stuff NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="-1710639418-1452417368-1363217199=:31399" X-Trace: ger.gmane.org 1363217224 16798 80.91.229.3 (13 Mar 2013 23:27:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 23:27:04 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 00:27:29 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 1UFv4u-0002Ea-Cs for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 00:27:24 +0100 Original-Received: from localhost ([::1]:42234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFv4X-0006mq-TZ for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Mar 2013 19:27:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFv4H-0006fu-6T for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 19:26:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFv4D-00020J-9r for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 19:26:45 -0400 Original-Received: from nm17.bullet.mail.bf1.yahoo.com ([98.139.212.176]:49063) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UFv4C-0001zx-V8 for help-gnu-emacs@gnu.org; Wed, 13 Mar 2013 19:26:41 -0400 Original-Received: from [98.139.212.153] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 23:26:40 -0000 Original-Received: from [98.139.212.194] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 23:26:40 -0000 Original-Received: from [127.0.0.1] by omp1003.mail.bf1.yahoo.com with NNFMP; 13 Mar 2013 23:26:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 371996.25987.bm@omp1003.mail.bf1.yahoo.com Original-Received: (qmail 31753 invoked by uid 60001); 13 Mar 2013 23:26:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1363217200; bh=wI/2+I4aSGQz6Fxt7hqf/vIacpvUtGiZdSiiPrGEwkY=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=cj+yEvDKwuwzah4r4Zp7dR4fgYdd4Zt/k2h82bHSmUYuj0JSX7dlwkKTNGdZaACL97iUIVXuZaTcMcNnuCkgcepUb/ydlLc3TX5RGt805SlqhQBS11uB9cLfXemlDVWbM9kKFOUHLwPixtQzFgfgZq57/NAEFksKbMNcuyEyvLI= 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:Cc:In-Reply-To:MIME-Version:Content-Type; b=EEjx4wTbdlWXE2WgW+bzaSTY5FTrTsRppP3m1Xz5km/4T47IKljM1svSwWvE5I3NelDxIcAj+ixGdDgf/SrwbQRBHyqamsDZJfV6vE6hm26BDSVntbxZB28ljySaJcs4oovh4ze5wFpGnF4tk51YVvsOMOSd28T46qosPaNCIqg=; X-YMail-OSG: aTNb46gVM1k1CopXF5IfSJPl_fd3FH2nfGG9BLOqyNos3kC 0thihZOydYLx8w4mC8jWYVauoS8NEzkoTqle5zDG4yNYD4HPtbooJorUJJcP i2YwsHRA6CPcnop_rh_57lv1IIQrtBpqFbD5s9Ja34NQmcoWRRhS.pwcPF10 ZrabQTh77AScv7MFAIqVY0GODj1K3SOoLrJCnOXh0kGcKxep4fy7_LKb3h.n jR_M9Otb5neltsd5l0GIy9MMEwXiQFx6rmizAfe8GS3TcoSfosXCOsgWbjKQ RCM84p1KH0iAuNpBhetBXy8MXoIePASShoI5bjjIiPHbwhqvgIlDgEhchEJr Aov6OeTkp9RwL_5_lQ43zPTgwKd7s8kbZqc6jeNhO1gkoc6l7Z9xDkRZjz.y fKVXLlVoERmZj6JgoqWdZz3YQZqLFpz9Ig784JZ2ruM.4_AdSk5RqAOaJ.Pb _ZQOS1De0HwRqt1yb3va1nLE83efdGX1gWdodX1hqqW7H_XsPI6WQe.uOyz9 3FvhZstKgVu2PCuD2daYAbzdX3A-- Original-Received: from [98.145.41.146] by web165001.mail.bf1.yahoo.com via HTTP; Wed, 13 Mar 2013 16:26:39 PDT X-Rocket-MIMEInfo: 002.001, SGkgQWdhaW4sCgpJIGJlbGlldmUgdGhhdCB0aGUgYnl0ZXMgb24gZGlzayAqaGF2ZSogY2hhbmdlZC7CoCBUaGVyZSBpcyBubyBvdGhlciB3YXkgdG8gZXhwbGFpbiB0aGF0IHRoZSB0ZXh0IHVzZWQgdG8gZGlzcGxheSBjb3JyZWN0bHkgaW4gbm90ZXBhZCBhbmQgbm93IGRvZXNuJ3QuwqAgSW4gbm90ZXBhZCBJIHNlZSB0aGUgc2FtZSBleHRyYW5lb3VzIC8gaW5jb3JyZWN0IGNoYXJhY3RlcnMgdGhhdCBJIHNlZSBpbiBFbWFjcy7CoCBTbyBJIHRoaW5rIHRoYXQgSSBoYXZlIGEgY29ycmVjdGx5IHV0Zi04IGUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.137.519 In-Reply-To: <4E301087-AEB5-4214-B6BB-C52DA31DE339@Web.DE> X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 98.139.212.176 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:89516 Archived-At: ---1710639418-1452417368-1363217199=:31399 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Again,=0A=0AI believe that the bytes on disk *have* changed.=C2=A0 There= is no other way to explain that the text used to display correctly in note= pad and now doesn't.=C2=A0 In notepad I see the same extraneous / incorrect= characters that I see in Emacs.=C2=A0 So I think that I have a correctly u= tf-8 encoded file which contains some characters that I don't want.=C2=A0 I= s there really no way to use global search and replace to replace these cod= epoints?=0A=0A-jason=0A=0A=0A=0A=0A________________________________=0A From= : Peter Dyballa =0ATo: Tech Stuff =0ACc: W. Greenhouse ; "help-gnu-emacs@gnu.o= rg" =0ASent: Wednesday, March 13, 2013 3:16 PM=0AS= ubject: Re: File Encoding Issue on Windows=0A =0A=0AAm 13.03.2013 um 22:11 = schrieb Tech Stuff:=0A=0A> apparently I saved the files with the wrong enco= ding.=C2=A0 So now I think that I really have those incorrect characters.= =0A=0AWhy? Before your failure the file had 31 bytes contents. In some code= page this represents 31 characters, in UTF-8 this represents 29 characters= .=0A=0AWhen you save a text in UTF-8 encoding in some 8-bit code page *and*= *you* *do* *not* *change* *one* *single* *byte* then the file's contents i= s not changed (because GNU Emacs does not change a single byte). What's cha= nged, for the application that displays this file's contents, is the perspe= ctive. Example: as a child on four extremities you could only see from asid= e the green of a carrot. As a grown-up you can look down on the same green = (and know that something with a different colour is below the surface). And= when you're dead you'll see what the other colour is.=0A=0ASame bytes, dif= ferent perspectives, different (re)presentations for you.=0A=0AOr consider = a series of bit and bytes in a computer's memory. Some computers read the s= ame sequence=C2=A0 and interpret the first eight bits as the Most Significa= nt Byte, others assume it's the Least Significant Byte, one sees that your = bank account has a credit, the other sees the debit.=0A=0ASo just try to "s= witch" through some encodings! And don't forget to watch the mode-line: Doe= s it signal a modified file while switching? And: Does it work to save an u= nmodified file? (What has this to do with encodings?!)=0A=0A--=0AGreetings= =0A=0A=C2=A0 Pete=0A=0AThe day Microsoft makes something that doesn't suck = is the day they start selling vacuum cleaners.=0A=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =E2=80=93 Ernest Jan Plu= gge ---1710639418-1452417368-1363217199=:31399 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Again,

I be= lieve that the bytes on disk *have* changed.  There is no other way to= explain that the text used to display correctly in notepad and now doesn't= .  In notepad I see the same extraneous / incorrect characters that I = see in Emacs.  So I think that I have a correctly utf-8 encoded file w= hich contains some characters that I don't want.  Is there really no w= ay to use global search and replace to replace these codepoints?

-ja= son



From: Peter Dyballa <Peter_Dyballa@Web.DE>
To:= Tech Stuff <techstuff1971@yahoo.com>
Cc: W. Greenhouse <wgreenhouse@riseup= .net>; "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
<= span style=3D"font-weight: bold;">Sent: Wednesday, March 13, 201= 3 3:16 PM
Subject: Re:= File Encoding Issue on Windows

=0A
Am 13.03.2013= um 22:11 schrieb Tech Stuff:

> apparently I saved the files with= the wrong encoding.  So now I think that I really have those incorrec= t characters.

Why? Before your failure the file had 31 bytes content= s. In some code page this represents 31 characters, in UTF-8 this represent= s 29 characters.

When you save a text in UTF-8 encoding in some 8-bi= t code page *and* *you* *do* *not* *change* *one* *single* *byte* then the = file's contents is not changed (because GNU Emacs does not change a single = byte). What's changed, for the application that displays this file's conten= ts, is the perspective. Example: as a child on four extremities you could o= nly see from aside the green of a carrot. As a grown-up you can look down o= n the same green (and know that something with a different colour is below = the surface). And when you're dead you'll see what the other colour is.
=
Same bytes, different perspectives, different (re)presentations for you.

Or consider a series of bit and bytes in= a computer's memory. Some computers read the same sequence  and inter= pret the first eight bits as the Most Significant Byte, others assume it's = the Least Significant Byte, one sees that your bank account has a credit, t= he other sees the debit.

So just try to "switch" through some encodi= ngs! And don't forget to watch the mode-line: Does it signal a modified fil= e while switching? And: Does it work to save an unmodified file? (What has = this to do with encodings?!)

--
Greetings

  Pete
<= br>The day Microsoft makes something that doesn't suck is the day they star= t selling vacuum cleaners.
         &= nbsp;      =E2=80=93 Ernest Jan Plugge



=
---1710639418-1452417368-1363217199=:31399--