[Date Prev][Date Next]
At 01:45 AM 9/22/2004, Imobach González Sosa wrote:
>First of all, I've got to apologize because I don't know if this is the
>correct forum to post this question. So, if it's off-topic here, feel free to
Well, for the most post, as you'll see from my answer below,
the issue (upon analysis) is not really OpenLDAP specific.
However, a few side points are slapd(8) specific.
The encoding of the values is standardized. So, questions
about their encoding are not specific to any particular
implementation. The error message which slapd(8)
provided means that the value is not properly encoded.
While the precise wording of the message is specific
to slapd(8), the meaning isn't.
If you look at the 'gecos' attribute type in the subschema,
you'll note that it has syntax identified by
220.127.116.11.4.1.1418.104.22.168.26, which subschema reports to
be IA5 String (IA5 == International ASCII 5, e.g., US-ASCII).
You should also be able to find this information in the
technical specifications for this schema.
To encode IA5, which is simply send the ASCII. UTF-8 (and
Unicode) simply doesn't apply here.
You cannot send accented characters as IA5 simply doesn't
includes them. There are no special flags that you can set
which would cause slapd(8) not to verify that the value
provided conforms to the requirement of the syntax.
So, you have two basic choices,
1) use IA5 as required by the governing syntax
2) use some other schema
Of course, your applications might actually require this
specific schema, so in that case, you stuck with IA5.
I would suggest, if you have any follow-up questions
that are not OpenLDAP specific (I cannot think of any
that likely would be), that you take them to the general
LDAP list <email@example.com>.
>I've been trying to add some posixAccount objects to my LDAP tree with a perl
>script using Net::LDAP module. But I've no luck. It always complains about a
> failed to add entry: gecos: value #0 invalid per syntax at...
>The cause is that I'm trying to fill the gecos field with a string that
>contains characters such as accents. So, the question is: what encoding
>OpenLDAP feels happy with? Must I compile OpenLDAP with some special flags?
>I've tried to convert the string to UTF-8, but then I lost all the accents.
>Thank you in advance.
>Imobach González Sosa
>Servicio de Informática y Comunicaciones de la ULPGC
>Teléfono: +34 928 459519