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: desktop and encodings Date: Mon, 23 May 2005 20:01:54 +0200 Message-ID: <248dc4723176b07ba4076198d63c9957@Web.DE> References: <873bsj2olr.fsf@madamex.madamex.dk> <87psvkig3m.fsf@madamex.madamex.dk> <87r7fyuj19.fsf@madamex.madamex.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1116871523 18549 80.91.229.2 (23 May 2005 18:05:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 May 2005 18:05:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 23 20:05:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DaHH9-0003MU-F8 for geh-help-gnu-emacs@m.gmane.org; Mon, 23 May 2005 20:03:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DaHKe-0001bd-HB for geh-help-gnu-emacs@m.gmane.org; Mon, 23 May 2005 14:07:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DaHJr-00018o-9H for help-gnu-emacs@gnu.org; Mon, 23 May 2005 14:06:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DaHJq-00018T-Pw for help-gnu-emacs@gnu.org; Mon, 23 May 2005 14:06:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DaHJq-000163-L6 for help-gnu-emacs@gnu.org; Mon, 23 May 2005 14:06:26 -0400 Original-Received: from [217.72.192.224] (helo=smtp06.web.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DaHOg-0005Ri-Qd for help-gnu-emacs@gnu.org; Mon, 23 May 2005 14:11:27 -0400 Original-Received: from [84.245.189.179] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.105 #291) id 1DaHFU-0002fy-00; Mon, 23 May 2005 20:01:56 +0200 In-Reply-To: <87r7fyuj19.fsf@madamex.madamex.dk> Original-To: Mads Jensen X-Mailer: Apple Mail (2.622) X-Sender: Peter_Dyballa@web.de 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:26936 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26936 Am 23.05.2005 um 16:13 schrieb Mads Jensen: > =C3=A6=C3=B8=C3=A5 gets turned into something like =C3=82=C2=A5... > What see is the 'translation' of some ISO Latin encoding into UTF-8 and=20= then displaying these double byte values as unibytes! This could explain a bit: ; oct dec hex UCS2 UTF-8 ;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D 240 =3D 160 =3D A0 =3D U+00A0 =3D C2 A0 : NO-BREAK SPACE =C4=84 =3D 241 =3D 161 =3D A1 =3D U+0104 =3D C4 84 : LATIN CAPITAL = LETTER A WITH=20 OGONEK =C4=B8 =3D 242 =3D 162 =3D A2 =3D U+0138 =3D C4 B8 : LATIN SMALL = LETTER KRA =C5=96 =3D 243 =3D 163 =3D A3 =3D U+0156 =3D C5 96 : LATIN CAPITAL = LETTER R WITH=20 CEDILLA =C2=A4 =3D 244 =3D 164 =3D A4 =3D U+00A4 =3D C2 A4 : CURRENCY SIGN =C4=A8 =3D 245 =3D 165 =3D A5 =3D U+0128 =3D C4 A8 : LATIN CAPITAL = LETTER I WITH=20 TILDE =C4=BB =3D 246 =3D 166 =3D A6 =3D U+013B =3D C4 BB : LATIN CAPITAL = LETTER L WITH=20 CEDILLA =C2=A7 =3D 247 =3D 167 =3D A7 =3D U+00A7 =3D C2 A7 : SECTION SIGN =C2=A8 =3D 250 =3D 168 =3D A8 =3D U+00A8 =3D C2 A8 : DIAERESIS =C5=A0 =3D 251 =3D 169 =3D A9 =3D U+0160 =3D C5 A0 : LATIN CAPITAL = LETTER S WITH=20 CARON =C4=92 =3D 252 =3D 170 =3D AA =3D U+0112 =3D C4 92 : LATIN CAPITAL = LETTER E WITH=20 MACRON =C4=A2 =3D 253 =3D 171 =3D AB =3D U+0122 =3D C4 A2 : LATIN CAPITAL = LETTER G WITH=20 CEDILLA =C5=A6 =3D 254 =3D 172 =3D AC =3D U+0166 =3D C5 A6 : LATIN CAPITAL = LETTER T WITH=20 STROKE =C2=AD =3D 255 =3D 173 =3D AD =3D U+00AD =3D C2 AD : HYPHEN-MINUS =C5=BD =3D 256 =3D 174 =3D AE =3D U+017D =3D C5 BD : LATIN CAPITAL = LETTER Z WITH=20 CARON =C3=81 =3D 301 =3D 193 =3D C1 =3D U+00C1 =3D C3 81 : LATIN CAPITAL = LETTER A WITH=20 ACUTE =C3=82 =3D 302 =3D 194 =3D C2 =3D U+00C2 =3D C3 82 : LATIN CAPITAL = LETTER A WITH=20 CIRCUMFLEX =C3=83 =3D 303 =3D 195 =3D C3 =3D U+00C3 =3D C3 83 : LATIN CAPITAL = LETTER A WITH=20 TILDE =C3=84 =3D 304 =3D 196 =3D C4 =3D U+00C4 =3D C3 84 : LATIN CAPITAL = LETTER A WITH=20 DIAERESIS =C3=85 =3D 305 =3D 197 =3D C5 =3D U+00C5 =3D C3 85 : LATIN CAPITAL = LETTER A WITH=20 RING ABOVE =C3=86 =3D 306 =3D 198 =3D C6 =3D U+00C6 =3D C3 86 : LATIN CAPITAL = LETTER AE =C3=A6 =3D 346 =3D 230 =3D E6 =3D U+00E6 =3D C3 A6 : LATIN SMALL = LETTER AE First column contains the glyphs as they are, next columns have the=20 glyph's byte value expressed as octal, decimal, or hexadecimal=20 numerals. Next column, UCS2, show the slot number (ASCII code) of that=20= glyph in Unicode (which, I think, is too the internal representation in=20= GNU Emacs). The next column now shows into which bytes the glyphs from=20= column 1 are translated as UTF-8. As you can see you can 'see' the=20 UTF-8 bytes as 'normal' characters, a UTF-8 encoded =C3=A6 is just = '=C3=84=C4=BB' if=20 displayed in ISO Latin-4, '=C3=84=C2=A6' in ISO Latin-1 ... So, to conclude: your Emacs obviously saves your input as UTF-8, and=20 you have to make the buffer display in UTF-8 too! The correct headers=20 would look like ;;; -*- mode: Text; coding: utf-8; -*- Once you have the file opened in the wrong encoding you can change that=20= with revert-buffer-with-coding-system, C-x RET r utf-8 RET. Have you thought of (prefer-coding-system 'utf-8-unix) Could be it cures a lot. There is too (set-language-environment =20 'Danish) ... -- Mit friedvollen Gr=C3=BC=C3=9Fen Pete In a world without walls and fences, who needs gates and windows?