Gnus development mailing list
 help / color / mirror / Atom feed
From: Kenichi Handa <handa@ni.aist.go.jp>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: [Unicode-2] `read' always returns multibyte symbol
Date: Thu, 15 Nov 2007 23:41:23 +0900	[thread overview]
Message-ID: <E1IsfuF-0004nF-9Q@etlken.m17n.org> (raw)
In-Reply-To: <b4moddv20sy.fsf@jpl.org> (message from Katsumi Yamaoka on Thu, 15 Nov 2007 20:41:33 +0900)

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

In article <b4moddv20sy.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:

> > If "modifies" means that 8-bit bytes are converted to
> > multibyte characters as what string-as-multibyte does, it's
> > an expected behaviour.

> What I observed was different.  The group name "テスト" is
> encoded by utf-8 by the nntp server into:

> "\343\203\206\343\202\271\343\203\210"

> After it is transferred to Gnus, in the nntp process bufer it is
> modified into:

> "\343\203XY\343\203\210"

> Where X is (make-char 'greek-iso8859-7 99)
>   and Y is (make-char 'latin-iso8859-2 57).

That is exactly what string-as-multibyte does. \206\343 and
\202\271 are valid multibyte forms in the current Emacs,
thus are treated as multibyte characters.

> Since Gnus treats a group name as a unibyte string, finally it
> is made into:

> "\343\203\343\271\343\203\210"

It seems that gnus treats "\343\203XY\343\203\210" as
unibyte by converting it by string-make-unibyte.

Please try this:

(string-make-unibyte
 (string-as-multibyte "\343\203\206\343\202\271\343\203\210"))

You'll get the above result, ... yes, very weird.

On the other hand,

(string-as-unibyte
 (string-as-multibyte "\343\203\206\343\202\271\343\203\210"))
 =>  "\343\203\206\343\202\271\343\203\210"

> > I long ago proposed a facility that turns on the
> > multibyteness of a buffer while converting 8-bit bytes to
> > multibyte characters as what string-to-multibyte does, but
> > not accepted.

> But the modern Emacsen does do so, doesn't it?

No.

---
Kenichi Handa
handa@ni.aist.go.jp

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2007-11-15 14:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  9:41 Katsumi Yamaoka
2007-11-13 12:55 ` Kenichi Handa
2007-11-13 15:10   ` Stefan Monnier
2007-11-14  4:53     ` Kenichi Handa
2007-11-14  3:56   ` Katsumi Yamaoka
2007-11-14 11:39     ` Katsumi Yamaoka
2007-11-14 14:52       ` Stefan Monnier
2007-11-14 23:52         ` Katsumi Yamaoka
2007-11-15  1:15           ` Stefan Monnier
2007-11-15  3:01             ` Katsumi Yamaoka
2007-11-15  3:39               ` Stefan Monnier
2007-11-15 10:20       ` Katsumi Yamaoka
2007-11-15 11:08         ` Kenichi Handa
2007-11-15 11:41           ` Katsumi Yamaoka
2007-11-15 14:41             ` Kenichi Handa [this message]
2007-11-15 23:31               ` Katsumi Yamaoka
2007-11-16  0:51                 ` Kenichi Handa
2007-11-16  1:24                   ` Katsumi Yamaoka
2007-11-16  2:51                     ` Stefan Monnier
2007-11-15 15:22           ` Stefan Monnier
2007-11-16  0:29             ` Kenichi Handa
2007-11-16 10:50             ` Eli Zaretskii
2007-11-13 15:07 ` Stefan Monnier

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=E1IsfuF-0004nF-9Q@etlken.m17n.org \
    --to=handa@ni.aist.go.jp \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=yamaoka@jpl.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).