>>>> "Josh" == Josh Huber
<huber(a)alum.wpi.edu> writes:
Josh> Simon Josefsson <jas(a)extundo.com> writes:
> RFC (2)822 articles should not contain iso-8859-15 characters.
> Perhaps mail-extr is supposed to operate on raw articles, not
> MIME decoded ones?
Josh> Ah, you're probably right. Now I'm not sure what's supposed
Josh> to be happening, since BBDB gets passed the header after
Josh> it's been decoded, but it uses
Josh> mail-extract-address-components (mail-extr.el) or
Josh> rfc822-addresses (rfc822.el) [both part of mail-lib]. So,
Josh> where's the bug? There's code in there already to handle
Josh> latin-1 chars:
No, there isn't. There's code in there to handle _8-bit_ characters.
Try this:
(let* ((latin1-ss (string (make-char 'latin-iso8859-1 95)))
;; don't use non-ASCII values in make-char, it's bad style
;; these values are indicies into ISO 2022 registers
(latin2-ss (string (make-char 'latin-iso8859-2 95)))
(latin1-addr (concat "Joe Te" latin1-ss "t
<joe.test(a)foo.org>"))
(latin2-addr (concat "Joe Te" latin2-ss "t
<joe.test(a)foo.org>")))
(concat "Works: <" (car (mail-extract-address-components latin1-addr))
">, Broken: <" (car (mail-extract-address-components latin2-addr))
">"))
So it only works on Latin-1 by accident.
I don't know what it would take to make this work on non-ISO-8859-1
characters.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
My nostalgia for Icon makes me forget about any of the bad things. I don't
have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py