From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: character encoding EMACS + WINDOWS +SHELL Date: Tue, 10 Aug 2010 20:52:58 +0200 Message-ID: <4717FF90-4ED8-4BE5-BD8C-E73E3D5FF4EE@Web.DE> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1281467300 12196 80.91.229.12 (10 Aug 2010 19:08:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Aug 2010 19:08:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?ISO-8859-1?Q?Pablo_Mercader_Alc=E1ntara?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 10 21:08:17 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OiuBJ-0007i5-CZ for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Aug 2010 21:08:13 +0200 Original-Received: from localhost ([127.0.0.1]:55264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OitxC-0002PG-QU for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Aug 2010 14:53:38 -0400 Original-Received: from [140.186.70.92] (port=47506 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oitwk-0002M3-UG for help-gnu-emacs@gnu.org; Tue, 10 Aug 2010 14:53:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oitwd-0000Ov-8y for help-gnu-emacs@gnu.org; Tue, 10 Aug 2010 14:53:05 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]:53029) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oitwc-0000Oc-SM for help-gnu-emacs@gnu.org; Tue, 10 Aug 2010 14:53:03 -0400 Original-Received: from smtp02.web.de ( [172.20.0.184]) by fmmailgate03.web.de (Postfix) with ESMTP id 5B53C15D66A64; Tue, 10 Aug 2010 20:53:00 +0200 (CEST) Original-Received: from [91.35.168.242] (helo=[192.168.1.2]) by smtp02.web.de with asmtp (WEB.DE 4.110 #24) id 1Oitwa-0001c6-00; Tue, 10 Aug 2010 20:53:00 +0200 In-Reply-To: X-Mailer: Apple Mail (2.936) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX18ZqofMt6ZT5eGA6rTKHupZvG09QyGKGQbQPGH9 HE/2qOtnaijuNZtFa0HsDRnVbkVfjkfoyyGi1hJAbtifDlDbDC QkuEXANkhLoavppisBpA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74528 Archived-At: Am 10.08.2010 um 17:48 schrieb Pablo Mercader Alc=E1ntara: > 8. why is that instead of "co=F1o" I get "co=B1o"??, I read the manual = =20 > already > (the powerful emac's manual) encoding, decoding, "International =20 > Character > Support page 186 and i still don't get it, I think is related to the =20= > windows > shell encoding ?... Which is the encoding that Notepad uses for saving the file? Imagine =20 Notepad saves the file in codepage 437. The word co=F1o will consist of =20= these four bytes: 63=B76F=B7A4=B76F In code page 850 and 858 it will be the same, but in codepage 1252 it =20= will be: 63=B76F=B7F1=B76F The F1 byte is in code pages 437, 850, and 858 the PLUS-MINUS SIGN =20 =B1... (the other two bytes don't change their meaning, they stay c or o = =20 resp.) So we can explain what is presented to you that Notepad presumingly =20 saves the file in CP1252 and GNU Emacs opens it in CP858 or such. The =20= byte F1, formerly presented to you as =F1 is now, according to the new =20= encoding use to interpret the byte values, is now presented to you as =B1.= In GNU Emacs you have the option to open the Options menu, go to Mule =20= (Multilingual Environment) and traverse into Set Coding Systems and =20 then either choose "For Next Command (C-x RET c)" to open the file in =20= the encoding you now input in mini-buffer or, when you have the file =20 already open, choose "For Reverting This File Now (C-x RET r)" and =20 input the new encoding. GNU Emacs will present you the file's bytes =20 according to this new encoding. > 10 I type "EDIT.COM prueba.txt", puff ! the same "co=B1o", ..., is =20 > there some > way to fix this? to display the right character "=F1"? (I'm sure there = =20 > is some > way!) how?? See the documentation of environment variables. In UNIX, GNU Emacs =20 understands LC_CTYPE and LANG. In Elisp you can set instead: (prefer-coding-system 'windows-1252) -- Greetings Pete Well done is better than well said. =96 Benjamin Franklin