Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: locale ISO-8859-15, UTF-8 and mail...
Date: Fri, 19 Jul 2002 09:19:39 +0200	[thread overview]
Message-ID: <vaf8z48jib8.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <87bs94vk9w.fsf@tzone.org> (fabien@tzone.org's message of "18 Jul 2002 16:44:11 -0400")

fabien@tzone.org (Fabien Niñoles) writes:

>>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
>
>     Kai> I don't understand.  What does `W M c' have to do with
>     Kai> latinX-disp.el?
>
> Nothing.  There seems to have two "bugs" here:
>
> 1- Gnus seems to defined it's own buffer-display-table instead of
> using the standard-display-table.  Since latinX-disp.el simply
> modify the standard-display-table to be effective, it doesn't seems
> to work in gnus (at least v5.9.0 that I used here).

What does Gnus use that display table for?  Maybe it's used for
something useful.  But maybe Gnus should inherit from the standard
display table, and then frobbing that first with latinX-disp should
do the trick.

> 2- I isolate the other bug (the \201 or \216 character add before
> every high-bit set character in multibyte environment) to a bug in
> the coding-system.  To test it just evaluate this:
>
> (decode-coding-string "élève" 'iso-8859-1) => "\216él\216ève" in latin-1 environment.

The documentation for decode-coding-string says that it is required
for the string to be encoded in the given coding system.  Maybe your
string is in iso-8859-15 and not iso-8859-1.  If you give
decode-coding-string some Japanese and tell it to decode as
iso-8859-1, it won't be surprising that you get garbage, either.

\216\151 is the internal Emacs representation (the Mule encoding) of
that accented character in Latin-9.  \201\151 would be the internal
representation of the same character in Latin-1.

You can type C-u C-x = on the é character to verify whether it is in
iso-8859-1.

Hm.

Hm.

Also, I think that the function has been misapplied.
decode-coding-string and encode-coding-string are for converting
between external and internal representations.  So,
(decode-coding-string X 'iso-8859-1) takes a sequence X of bytes
encoded as iso-8859-1 and returns a string encoded in Emacs' internal
encoding.  But you were passing not a sequence of bytes encoded in
iso-8859-1, you were passing a Lisp string encoded in Emacs' internal
encoding.  And that encoding happens to use \216\151 for the é
character, so that's what you get...

Maybe you can use vector to create a proper sequence of bytes.
Or you get the bytes from an I/O operation (input, to be specific).

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



      parent reply	other threads:[~2002-07-19  7:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17 18:01 Fabien Niñoles
2002-07-18 11:41 ` Kai Großjohann
2002-07-18 16:12   ` Fabien Niñoles
     [not found]   ` <878z49dnk3.fsf@tzone.org>
     [not found]     ` <vaf4rew25r4.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de>
2002-07-18 20:44       ` Fabien Niñoles
2002-07-18 20:56         ` Jorgen Schaefer
2002-07-19  7:19         ` Kai Großjohann [this message]

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=vaf8z48jib8.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=ding@gnus.org \
    /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.
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 NNTP newsgroup(s).