dev-blog

Saturday, January 15, 2005

Firefox ldif file processor for importing int windows address book

Firefox correctly encodes special characters like German "Umlaut" characters according to the LDIF RFC 2849.

In order to successfully import such ldif file into the windows address book the character encoding has to be changed from UTF-8 to iso-8859-1 (found by experiment):

  1. filter for lines with properties separated by double colon (instead of single colon)
  2. decode the value using Base64 decoder
  3. convert the byte stream into a character stream using a UTF-8 decoder
  4. convert the character stream into a byte stream using a ISO-8859-1 encoder
  5. encode the byte stream with a Base64 encoder

After this conversion the file can be succesfully imported into the windows address book.

0 Comments:

Post a Comment

<< Home