D
D
DanSab2012-09-25 19:35:48
Python
DanSab, 2012-09-25 19:35:48

Cyrillic character encoding in AD?

Good afternoon.
When requesting LDAP (MS AD) from the ldap module, a response is returned, where all Cyrillic characters are presented in an encoding unknown to me.
For example:

CN=\xd0\x9f\xd0\xb5\xd1\x82\xd1\x80 \xd0\x9f. \xd0\x9f\xd0\xb5\xd1\x82\xd1\x80\xd0\xbe\xd0\xb2,OU=some,DC=local,DC=lan

What is this encoding? How to decode this character set?
I specify the details: windows server 2003, the script is launched from under Ubuntu.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2012-09-25
@uscr

This is unicode. If you have a python at hand, you can write in the console: print '\xd0\x9f\xd0\xb5\xd1\x82\xd1\x80 \xd0\x9f. \xd0\x9f\xd0\xb5\xd1\x82\xd1\x80\xd0\xbe\xd0\xb2' and find out that it is "Peter P. Petrov". I guess you need to specify the encoding before querying AD.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question