Issue121

classification
Title mail-extract-address-components
Type Module
Severity Platform
Keywords
explanation
process
These optional controls are only of interest to committers and tracker administrators.
Status new   Reason
Superseder   Submitted 2007-10-15.16:09:17
Priority   Assigned To
Nosy List  

Created on 2008-01-19.06:42:57 by jeff, last changed 2008-01-19.06:42:57 by jeff.

Messages
msg153 [hidden] ([hidden]) Date: 2008-01-19.06:42:57
  Message-ID: <18195.37037.648971.503163@mail.delphioutpost.com>
For a while I've had trouble with invalid email address 
  "Ville Skyttä <scop@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@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@xemacs.org>")
  ==> ("Ville Skytt" "Ville Skyttä <scop@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/&Atilde
  (modify-syntax-entry ?\¤ "w" mail-extr-address-syntax-table) ;A4/&curren

After I did that I get
  (mail-extract-address-components "Ville Skyttä <scop@xemacs.org>")
  ==>  ("Ville Skytt" "scop@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@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
History
Date User Action Args
2008-01-19 06:42:57jeffcreate