Hi,
I hope this is fixed in Emacs 22.2 (or possibly 22.1). I've been
annoyed that `mail-extract-address-component' sometimes fails to
parse addresses containing non-ASCII names correctly. Japanese
people often use their native names in the From header. Since
they sometimes use non-ASCII letters which are not specified as
words in the syntax table, Gnus, for example, fails to build the
recipient address when replying. Here are examples:
(mail-extract-address-components "阿部 晋三 <[EMAIL PROTECTED]>")
=> ("阿部 晋三 <Shinzo Abe" "阿部 晋三 <[EMAIL PROTECTED] ")
(mail-extract-address-components "阿部 晋三 ◆ <[EMAIL PROTECTED]>")
=> ("阿部 晋三 ◆ <Shinzo Abe" "阿部 晋三 ◆ <[EMAIL PROTECTED] ")
(mail-extract-address-components
"阿部 晋三 (しんちゃん) <[EMAIL PROTECTED]>")
=> ("阿部 晋三 (しんちゃん" "[EMAIL PROTECTED]")
The causes are " " (wide space) and "◆" in the name portion
and `m-e-a-c' uses `forward-word' to try to skip them even if
they are not words. I tried fixing of this problem as follows:
(NOTE: it contains Latin-1 nbsp characters encoded with utf-8.)
*** mail-extr.el~ Sun Jan 21 21:57:52 2007
--- mail-extr.el Mon May 14 03:16:51 2007
***************
*** 873,879 ****
(mail-extr-nuke-char-at (point))
(forward-char 1))
(t
! (forward-word 1)))
(or (eq char ?\()
;; At the end of first address of a multiple address header.
(and (eq char ?,)
--- 873,889 ----
(mail-extr-nuke-char-at (point))
(forward-char 1))
(t
! ;; Do `(forward-word 1)', recognizing non-ASCII characters
! ;; except Latin-1 nbsp as words.
! (while (progn
! (skip-chars-forward "^\000-\177 ")
! (and (not (eobp))
! (eq ?w (char-syntax (char-after)))
! (progn
! (forward-word 1)
! (and (not (eobp))
! (> (char-after) ?\177)
! (not (eq (char-after ? ))))))))))
(or (eq char ?\()
;; At the end of first address of a multiple address header.
(and (eq char ?,)
I appreciate someone looking into it.
Regards,
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug