problems whith accented characters

Alan DeKok aland at deployingradius.com
Thu May 29 14:58:34 CEST 2008


Gianfranco Ferrini wrote:
> I have problems with accented characters (and other like ç)
> in user passwords.

 ... when you don't use UTF-8.

> When I try to autenticate with
> 
> Username        guest
> Password        università
> 
> I have this result:
> 
>         User-Name = "guest"
>         User-Password = "universit\340"

  \340 is hex 0xE0, which is not a valid UTF-8 character.

> Usually I use ldap for authorization but to become simpler

  The LDAP module enforces the LDAP specification on strings, which is
that they are UTF-8.  Any character that is not UTF-8 is replaced with a
hex equivalent (=e0), as defined by the specification.

> I put the account in user file:
> 
> guest   Cleartext-Password := "università "

  Which should work, because the "users" file doesn't care about UTF-8.
 It just does string matching.

> As you can see ( User-Password = "universit\340")
> it sems like arrive at freeradius a wrong carachter:

  No.  The character is 0xE0 (\340), and is not UTF-8.  So it is not
printed as 'à', because it is not valud.

> I try this autentication whith the software ntradping test utility
> on a windows XP system with a italian keyboard.

  Tell the XP system to use UTF-8, and not ISO-8859, or some other
character encoding.

  Alan DeKok.



More information about the Freeradius-Users mailing list