For a while I've had trouble with invalid email address
"Ville Skyttä <scop(a)xemacs.org "
getting saved into to my .bbdb file. This happens on
messages from Ville, which is has a utf-8 encoded =C3=A4=:
From: Ville =?utf-8?q?Skytt=C3=A4?= <scop(a)xemacs.org>
After some amount grovelling through the bbdb code I figured the
invalid email address is caused by mail-extract-address-components
defined in mail-lib/mail-extr.el.
(mail-extract-address-components "Ville Skyttä <scop(a)xemacs.org>")
==> ("Ville Skytt" "Ville Skyttä <scop(a)xemacs.org ")
mail-extract-address-components is rather intimidating. I saw some
syntax table code, so I modified the syntax entries for the
C3 and A4 characters from the utf-8 encoding:
(modify-syntax-entry ?\Ã "w" mail-extr-address-syntax-table) ;C3/Ã
(modify-syntax-entry ?\¤ "w" mail-extr-address-syntax-table) ;A4/¤
After I did that I get
(mail-extract-address-components "Ville Skyttä <scop(a)xemacs.org>")
==> ("Ville Skytt" "scop(a)xemacs.org")
Which is almost correct, except for the final character in
the last name. At least it doesn't produce an invalid email address.
Any suggestions on what would be a more correct fix here?
I'm using 21.4.18 mule on Ubuntu that I built from source.
I'm running XEmacs with LANG=en_US.iso-8859-1.
-jeff
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta