micahmanquen / django-ldap-groups

Automatically exported from code.google.com/p/django-ldap-groups
0 stars 0 forks source link

Unicode support for LDAP information saved into Django. #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use Active Directory for authentication.
2. Try to log in with a user which has non-ascii (unicode) characters in his 
name. (Will force the creation of the user in Django).
3. Login with a admin user.
4. Go to Users and verify that the name of the new user is not mangled.

What is the expected output? What do you see instead?
Expected Output for the First-name:
Ólafur
Current output for the First-name:
Ólafur

Suggested modifications attached in a patch-file. This is a patch against trunk.

Original issue reported on code.google.com by olafurgi on 14 Jul 2010 at 12:47

Attachments:

GoogleCodeExporter commented 8 years ago
This patch doesn't help me. When I log in with a character like Ó I get 
UnicodeEncodeError: ('ascii', u'\xd3lafur@ADMIN', 0, 1, 'ordinal not in 
range(128)')

However if I use .encode('utf-8') as seen in this patch it fixes the issue. In 
my case though I never had an issue of users getting created with incorrect 
names. Instead people would copy and paste say a non breaking space and it 
would 500 instead of just not allow the user to log in.

Original comment by dmbs...@gmail.com on 12 Feb 2012 at 12:25

Attachments: