Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Cc: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: IMAP charset confusion
Date: Sun, 21 Aug 2011 23:17:49 +0200	[thread overview]
Message-ID: <m3bovia2gy.fsf@stories.gnus.org> (raw)

I just tried copying a message to an nnimap group with non-ASCII
characters, and it wasn't a pretty sight.

Basically, I gave the name as "hïllo", and it was created as
"h llo" on the server.

The problem seems to have something to do with double-encoding names.
Before calling `-request-create-group', `gnus-read-move-group-name' does
this:

      (setq encoded (mm-encode-coding-string
		     to-newsgroup
		     (gnus-group-name-charset to-method to-newsgroup)))

Which does this:                     

(encode-coding-string "hïllo" 'iso-8859-1)
"h\357llo"

nnimap then encodes this in utf7:

(utf7-encode (encode-coding-string "hïllo" 'iso-8859-1) t)
"h&ACA-llo"

While we should have:

(utf7-encode "hïllo" 'iso-8859-1)
"h&AO8-llo"

(utf7-decode "h&AO8-llo" t)
"hïllo"

Katsumi, you seemed to introduce the encoding stuff in 2007, for good
reasons, I'm sure.  :-)  But here we have a backend that really knows
what charset it wants to use (the standard defines utf-7), so I'm not
sure what the solution here is.

Hm...  would it make sense to have `gnus-group-name-charset' just return
nil for all nnimap groups?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



             reply	other threads:[~2011-08-21 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 21:17 Lars Magne Ingebrigtsen [this message]
2011-08-21 21:31 ` Lars Magne Ingebrigtsen
2011-08-21 21:37   ` Lars Magne Ingebrigtsen
2011-08-21 23:23 ` Katsumi Yamaoka
2011-09-10 22:28   ` Lars Magne Ingebrigtsen
2011-09-10 22:46     ` Lars Magne Ingebrigtsen
2011-09-10 22:50       ` Lars Magne Ingebrigtsen
2011-09-11  8:08         ` Andreas Schwab
2011-09-12  4:28           ` Lars Magne Ingebrigtsen

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=m3bovia2gy.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=ding@gnus.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).