Gnus development mailing list
 help / color / mirror / Atom feed
* IMAP charset confusion
@ 2011-08-21 21:17 Lars Magne Ingebrigtsen
  2011-08-21 21:31 ` Lars Magne Ingebrigtsen
  2011-08-21 23:23 ` Katsumi Yamaoka
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-08-21 21:17 UTC (permalink / raw)
  To: ding; +Cc: Katsumi Yamaoka

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/



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-09-12  4:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-21 21:17 IMAP charset confusion Lars Magne Ingebrigtsen
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

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).