[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: International characters (OpenLDAP v2.0, PHP 4)

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Turbo Fredriksson

> >>>>> "Peter" == Peter Marschall <peter.marschall@adpm.de> writes:

>     Peter> You need to convert the international characters to UTF8.
> If I do this, PHP/OpenLDAP refuse because of 'Invalid syntax'. Doing
> a base64 encoding works.
> The new LDIF I'm playing with is a user with the 'cn=Örjan Östlund'
> (just to get a national character). UTF8 encoding it will give me the
> following output from 'ldapadd':
> ----- s n i p -----
> adding new entry "uid=test2%bayour.com,o=Turbo Fredriksson"
> ldap_add: Invalid syntax
>         additional info: givenname: value #0 invalid per syntax
> ----- s n i p -----
> And the LDIF looks like:
> ----- s n i p -----
> dn: uid=test2%bayour.com,o=Turbo Fredriksson
> uid: test2%bayour.com
> givenname: Ãrjan

This is not a UTF-8 encoded string. It kind of looks like ISO8859-1. In UTF-8
the character 'Ã' would be encoded as two separate octets 0xd8 0x83. Whatever
tool you used to convert text to UTF-8 is broken, or you're using it

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support