[Haskell-cafe] Encoding issues with LDAP package
tazjin at googlemail.com
Tue May 22 16:30:47 CEST 2012
I'm using the LDAP package by John Goerzen to retrieve some information from an Active Directory database. Part of this information are the full names of my company's employees.
Many of these names contain characters which aren't part of the standard ASCII set, for example ä å ü ê and so on. When I retrieve those names from the directory (the LDAP package returns them as Strings) the encoding breaks and I get results like "R\195\188diger" instead of "Rüdiger".
The Active Directory server supports LDAP v2 and v3. I assume the OpenLDAP C API, which is the backend behind the LDAP package, automatically chooses v3 to connect if available (this is speculation, correct me if I'm wrong).
Since LDAP v3 only speaks UTF8 and ASCII I also assume that the server returns UTF8.
Is this a known problem in the LDAP package? Or is this related to the OpenLDAP C API? Or even something on the server side?
Any information would be helpful!
More information about the Haskell-Cafe