Gnus development mailing list
 help / color / mirror / Atom feed
* APOP didn't work with pop3.el
@ 2005-06-02  6:10 Katsumi Yamaoka
  0 siblings, 0 replies; only message in thread
From: Katsumi Yamaoka @ 2005-06-02  6:10 UTC (permalink / raw)
  Cc: NAKAJI Hiroyuki

Hi,

I've fixed pop3.el in both the Gnus trunk and the v5-10 branch.
The problem was caused by the built-in md5 where the 4th
argument CODING-SYSTEM was not specified.

(md5 OBJECT &optional START END CODING-SYSTEM NOERROR)

In that case, CODING-SYSTEM defaults to the value of:

(symbol-value (car coding-category-list))

In Japan, many Emacs 21 users load Mule-UCS so as to be able to
use UTF-8 for Japanese text, and the value becomes `utf-16-le'.
So, md5 encodes a given OBJECT by that coding-system before
calculating the hash if OBJECT is a multibyte string.  Note that
encoding by utf-16-le modifies a string even if it contains only
ASCII characters.  For example:

(md5 (string-as-multibyte "ding"))
 => "c2eaa4c670cd4c1c537b2a2ae4fbeb5d"
(load "un-define")
 => t
(md5 (string-as-multibyte "ding"))
 => "4b0084d57991b6e1d787618fd808a6b6"

Furthermore, the same problem will occur even in the environment
of those who don't load Mule-UCS.  The following is the case of
mine:

(symbol-value (car coding-category-list))
 => japanese-iso-8bit
(let ((s (string-as-multibyte "\351\201\245")))
  (list (md5 s) (md5 s nil nil 'binary)))
 => ("3dfeb73bb814e0ec44993cc0be8976a6"
     "9942892cc8ccbe915ae3d0eba85f446d")

Regards,



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-02  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-02  6:10 APOP didn't work with pop3.el Katsumi Yamaoka

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