unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: [angeli@iwi.uni-sb.de: Coding problem with Euro sign]
Date: Wed, 14 Dec 2005 11:56:43 -0700	[thread overview]
Message-ID: <dnpptf$cqu$1@sea.gmane.org> (raw)
In-Reply-To: <E1EmJfO-000347-9K@fencepost.gnu.org>

Richard M. Stallman wrote:
 > Would someone please DTRT and ack?
 >
 > ------- Start of forwarded message -------
 > From: Ralf Angeli <angeli@iwi.uni-sb.de>
 > To: emacs-pretest-bug@gnu.org
 > Date: Tue, 13 Dec 2005 13:12:02 +0100
...
 > Subject: Coding problem with Euro sign
 > Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
...
 >
 > - --=-=-=
 >
 > Attached you can find a file with two 8-bit characters I extracted
 > from a file produced by Visual Studio under Windows.  The characters
 > should be u umlaut and the Euro sign.  Emacs does not seem to be able
 > to find the right coding system for it and displays it with
 > raw-text-dos.  I could not get the file displayed correctly by loading
 > it with iso-latin-1, iso-latin-9, or cp1251.  And I am not sure if
 > this is a problem of Emacs or if Visual Studio simply produced
 > garbage.
 >
 >
 > - --=-=-=
 > Content-Type: text/plain; charset=utf-8
 > Content-Disposition: attachment; filename=test.txt
 > Content-Transfer-Encoding: quoted-printable
 >
 > =FC u umlaut
 > =C2=80 euro
 >
 > - --=-=-=

I think the OP is confused: u umlaut is 0xFC in ISO 8859-1 (Latin 1),
ISO 8859-15 (Latin 9), and Unicode.  The euro is 0xA4 in ISO 8859-15 but
U+20AC in Unicode (and not defined in ISO 8859-1).

But in UTF-8, as the quoted-printable attachment claims to be, they are
0xC3 0xBC and 0xE2 0x82 0xAC resp.

The attachment above uses a single-byte encoding for u umlaut.  But the
encoding used for the euro is a either an unknown 2-byte encoding or the
wrong single-byte encoding (C2 is A circumflex in ISO 8859-15) followed
by 0x80 (undefined in ISO 8859-*).  That could explain why Emacs does
not recognize it as iso-latin-1 or iso-latin-9.

As far as Microsoft Windows code pages go, 1251 is Cyrillic so the OP
must have meant 1252.  And in that character set, the euro is indeed
0x80 (and 0xC2 is still A circumflex).

So the attachment should have been labelled windows-1252 instead of
utf-8, and its contents would be more accurately written as:

=FC u umlaut
=C2 A circumflex
=80 euro

And the OP should try visiting the file with the cp1252 coding system.

-- 
Kevin Rodgers

  reply	other threads:[~2005-12-14 18:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 23:34 [angeli@iwi.uni-sb.de: Coding problem with Euro sign] Richard M. Stallman
2005-12-14 18:56 ` Kevin Rodgers [this message]
2005-12-14 22:51   ` Ralf Angeli
2005-12-15  1:34     ` Kevin Rodgers
2005-12-15 16:20       ` Ralf Angeli
2005-12-15 22:02         ` Kevin Rodgers
2005-12-16  8:57           ` Eli Zaretskii
2005-12-16 17:59             ` Kevin Rodgers
2005-12-17  7:19               ` Eli Zaretskii
2005-12-16 11:55           ` Ralf Angeli
2005-12-16 22:58             ` Kevin Rodgers
2005-12-17  7:36               ` Eli Zaretskii
2005-12-17 10:47               ` Reiner Steib
2006-01-10 12:38             ` windows-XXXX and cpXXXX Kenichi Handa
2006-01-10 19:18               ` Eli Zaretskii
2006-01-11 11:35                 ` Kenichi Handa
2006-01-11 17:46                   ` Eli Zaretskii
2006-01-12  1:25                     ` Kenichi Handa
2006-01-12  4:33                       ` Eli Zaretskii
2006-01-12  8:29                         ` Werner LEMBERG
2006-01-12 19:56                           ` Eli Zaretskii
2006-01-12 13:23                         ` Kenichi Handa
2006-01-12 19:59                           ` Eli Zaretskii
2006-01-13  0:58                             ` Kenichi Handa
2006-01-13  8:52                               ` Eli Zaretskii
2006-01-13 11:50                                 ` Kenichi Handa
2006-01-13 12:59                                   ` Eli Zaretskii
2006-01-16  1:05                                     ` Kenichi Handa
2006-01-16  4:31                                       ` Eli Zaretskii
2006-01-16 12:11                                         ` Kenichi Handa
2006-01-13 14:45                                 ` Stefan Monnier
2005-12-16 10:35         ` [angeli@iwi.uni-sb.de: Coding problem with Euro sign] David Hansen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='dnpptf$cqu$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).