Re: ezmlm-idx and charsets

Alessandro Ranellucci <[email protected]> Fri, 26 Sep 2008 23:55:30 +0200
Newsgroups gmane.mail.ezmlm
Message-ID <r02010500-1049-D6D091A28C1511DDA065000393199010@[192.168.1.4]>
On 26-09-2008 at 20:21, Bruce Guenter wrote:

 >The obvious answer to my mind is to get ezmlm-idx to convert to
 >Unicode internally and always output UTF-8 to the indices.  The
 >gotcha there is that all the existing indices with extended
 >characters then effectively become corrupted, as the extended
 >characters of alternate charsets don't parse as UTF-8.

Hi Bruce.

As the ezmlm-www maintainer I strongly agree about the change towards
UTF-8.  However, I wouldn't require conversion of existing archives.
Since there's no current standard, having a mixed index makes sense to
me.

You can ensure backwards compatibility (i.e. trap a parser exception) by
checking if the string is encoded as UTF-8 or not.  If not, then output
it as as before.

You could borrow logic from isLegalUTF8() in
http://unicode.org/Public/PROGRAMS/CVTUTF.OLD/ConvertUTF.c

Regards,

--=20
alessandro ranellucci.
http://ezmlm-www.sourceforge.net/