UnicodeEncodeError: 'latin-1' codec can't encode characters in position 3-4: ordinal not in range(256)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Products.LDAPUserFolder |
Invalid
|
Low
|
Unassigned |
Bug Description
I use plone.app.ldap integrate AD to Plone4.1.3,when login using a chinese accoutname ,throw out the following error:
2011-12-01 20:55:40 ERROR event.LDAPDelegate 'latin-1' codec can't encode characters in position 3-4: ordinal not in range(256)
Traceback (most recent call last):
File "/home/
rec_dict['dn'] = from_utf8(rec_dn)
File "/home/
return encodeLocal(
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 3-4: ordinal not in range(256)
> /home/panlei/
-> return encodeLocal(
The bug was fixed by under process: plone41/ eggs/Products. LDAPUserFolder- 2.20-py2. 6.egg/Products/ LDAPUserFolder/ utils.py
/home/panlei/
64 line: encoding = 'latin1' to encoding = 'utf-8'