[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recoding a buffer coding system
From: |
Peter Dyballa |
Subject: |
Re: recoding a buffer coding system |
Date: |
Sat, 15 Aug 2009 17:15:01 +0200 |
Am 15.08.2009 um 16:31 schrieb Santiago Mejia:
In the buffer *http www:wordreference.com:80* I see the character that
firefox displays as "ü" (u with umlaut) as \303\274.
LATIN SMALL LETTER U WITH DIAERESIS is U+00FC. It is saved as C3 BC
(hex) or \303 \274. So you get a correct byte representation.
When I try to copy
and paste it here in this e-mail, however, it appears as: "ü"
Because LATIN CAPITAL LETTER A WITH TILDE is U+00BC and VULGAR
FRACTION ONE QUARTER is U+00BC and these two bytes are presented as
if belonging into some ISO Latin encoding.
As I said, however, if I merely save and reopen the file, the
characters
get shown properly.
Yes, GNU Emacs now interprets the two bytes as one Unicode character.
In case this is useful, in the buffer *http www:wordreference.com:80*
the variable 'buffer-file-coding-system' is mule-utf-8
In the end? When you re-open a second time?
The problem probably is that url-retrieve-synchronously fetches a
byte stream which is fed into a 7-bit (?) encoding buffer, so Unicode
encoded characters end up as two (or more) bytes which are display in
octal because their character codes are inappropriate for this encoding.
Me, working in GNU Emacs 23.1.50 and 22.3, see no octal codes, I only
see the bytes from the UTF-8 encoded umlauts etc. according to HTML
property "charset=utf-8." The buffer is in actual no encoding at all,
and so you're lucky that it's contents is saved as UTF-8! Therefore
no information is lost and obviously GNU Emacs uses the proper
encoding when it opens the *file* now.
Maybe using
(modify-coding-system-alist 'process "<some thing>" 'utf-8)
makes GNU Emacs handle the buffer, associated with no file and with
no process, more like it should... I haven't found the proper setting!
--
Greetings
Pete
Time is an illusion. Lunchtime, doubly so.
- recoding a buffer coding system, Santiago Mejia, 2009/08/14
- Re: recoding a buffer coding system, Eli Zaretskii, 2009/08/15
- Re: recoding a buffer coding system, Santiago Mejia, 2009/08/15
- Re: recoding a buffer coding system,
Peter Dyballa <=
- Re: recoding a buffer coding system, Santiago Mejia, 2009/08/15
- Re: recoding a buffer coding system, Peter Dyballa, 2009/08/15
- Re: recoding a buffer coding system, Eli Zaretskii, 2009/08/15
- Re: recoding a buffer coding system, Santiago Mejia, 2009/08/16
- Re: recoding a buffer coding system, Eli Zaretskii, 2009/08/16
- Re: recoding a buffer coding system, Peter Dyballa, 2009/08/16
- Re: recoding a buffer coding system, Eli Zaretskii, 2009/08/15
- Re: recoding a buffer coding system, Santiago Mejia, 2009/08/15
Re: recoding a buffer coding system, Peter Dyballa, 2009/08/15