all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Santiago Mejia <mejia@uchicago.edu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: recoding a buffer coding system
Date: Sat, 15 Aug 2009 17:15:01 +0200	[thread overview]
Message-ID: <6F6305D2-A661-4DA3-A5BB-02EA10068BB5@Web.DE> (raw)
In-Reply-To: <87hbw9m9mb.fsf@uchicago.edu>


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.







  reply	other threads:[~2009-08-15 15:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 21:31 recoding a buffer coding system Santiago Mejia
2009-08-15  6:36 ` Eli Zaretskii
2009-08-15 14:31   ` Santiago Mejia
2009-08-15 15:15     ` Peter Dyballa [this message]
2009-08-16  2:29       ` Santiago Mejia
2009-08-16  2:55         ` Peter Dyballa
2009-08-16  3:17           ` Eli Zaretskii
2009-08-16 13:49             ` Santiago Mejia
2009-08-16 17:06               ` Eli Zaretskii
2009-08-16 21:09             ` Peter Dyballa
2009-08-15 15:24     ` Eli Zaretskii
2009-08-16  2:33       ` Santiago Mejia
2009-08-15  8:26 ` Peter Dyballa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F6305D2-A661-4DA3-A5BB-02EA10068BB5@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mejia@uchicago.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.