Re: Bug #12740: LDAP modify functions do not handle special characters
| From: | Enrik Berkhan | Date: | Tue, 14 Aug 2001 13:57:06 +0000 |
| Subject: | Re: Bug #12740: LDAP modify functions do not handle special characters | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-63164@lists.php.net to get a copy of this message | ||
On Tue, Aug 14, 2001 at 01:41:24PM -0000, christian@metamerge.com wrote:
> I encounter problems when modifying some entries with attributes containing
> special chars (such as å, ø...). The error returned by the LDAP server is
> "invalid syntax".
>
> I have read some documentation about this. OpenLDAP can accept special
> chars, provided values are base64-encoded, when we use the tools that come
> with the application (ldapadd, ldapmodify, etc.).
This is true for input in LDIF format.
> But how to do this from PHP functions? I tried to base64_encode the
> values,
> it naturally didn't do the trick (those values were considered as normal,
> and thus were not decoded - this polutes my directory.) Same goes for
> urlencoding.
You have to use UTF-8 encoding.
Cheers,
Enrik