Convert Active Directory Object to string

Dirk Hagemann DirkHagemann at
Tue Jan 17 17:07:55 CET 2006


When I receive data from Microsoft Active Directory it is an
"ad_object" and has the type unicode. When I try to convert it to a
string I get this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 26: ordinal not in range(128)

This is caused by characters like the german ä, ö or ü.

But I (think I) need this as a string. Is there a simple solution???


More information about the Python-list mailing list