From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: NAKAJI Hiroyuki <nakaji@takamatsu-nct.ac.jp>
Subject: APOP didn't work with pop3.el
Date: Thu, 02 Jun 2005 15:10:55 +0900 [thread overview]
Message-ID: <b9ysm01jnkg.fsf@jpl.org> (raw)
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,
reply other threads:[~2005-06-02 6:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=b9ysm01jnkg.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=nakaji@takamatsu-nct.ac.jp \
/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).