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

Re: Problem with high-bit characters

On Friday, September 20, 2002, at 05:00  AM, Tony Earnshaw wrote:

fre, 2002-09-20 kl. 06:41 skrev Dan Lowe:

I am trying to migrate from Netscape Directory Server 4.x to OpenLDAP
2.0.25. I'm having a hard time figuring out how to get OpenLDAP to
accept values which might contain high-bit characters (such as é). For
those reading this in something that renders only low-bit ASCII, what I
have there is an "e" with an accent mark above it. This is commonly
used in non-English languages such as French - similar to ó ("o" with
accent mark) used in for instance Spanish.

In any case, I have such characters in an attribute mailAutoReplyText
(which as the name implies contains a string used when email
auto-replies are in use).  In the LDIF exported by Netscape, this
string is base64-encoded, for instance:

mailautoreplytext:: VGhpcyBpcyBhIHTpc3Q=

Which decoded reads "This is a tést".

Search for the string "UTF-8" in the Openldap admin guide, gettaple from
www.openldap.org. I have no trouble inputting names like Bjørn or Åge
(Bjoern, Aage) :-)

Judging by what I found you're suggesting I should be using a syntax of directoryString ( which is the UTF-8 type string, and which is used by 'name' values (cn, sn, etc). However, I've tried using that syntax and slapadd gave a parse error when it got to the entry in question. I tried these syntaxes:

Printable String
Octet String

Only the last (octet string) would let me add the value. With any other syntax defined for that attribute I would get a parse error from slapadd.

The rabbit runs faster than the fox, because the rabbit is running for
his life while the fox is only running for his dinner.	-Aesop