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

Re: LDAPv2 vs LDAPv3 & UTF-8



I understand your problem !
I used ldap V2 (openldap 1.2.7) and I want to use ldap V3 (openldap 2.0.7).
A migration of a ldap V2 base to a ldap V3 base is quite difficult (I used european accent inside). So I did not want to change my code (for different reasons).
So I decided to modify attribute syntax.


I generate my own schema using this synthax:
attributetype ( OID Name "my_attribute"
      EQUALITY caseIgnoreMatch
      SUBSTR caseIgnoreSubstringsMatch
      SYNTHAX 1.3.6.1.4.1.1466.115.121.1.40{128} )

This synthax avoid to change your code.
It is not really a beautiful way but if you do not have to open your system to a standard base it works !


Fabrice


From: "Yunhwan Kang" <vanora@grtg.com>
To: "Norbert Klasen" <norbert.klasen@daasi.de>, <openldap-software@OpenLDAP.org>
Subject: Re: LDAPv2 vs LDAPv3 & UTF-8
Date: Fri, 21 Sep 2001 10:20:22 +0900


thaks for your answer.

If i encode multi-byte characters from now, i have so many modifications on my program. it's terrible. =(

fortunately, i use ldapmodify.c source to make my ldap client.

Can I find a common & easy way to encode all the data with multi-byte characters?

I use the functions such as dosearch(), process_ldif_rec() in ldapmodify.c

without modifying so many clients source, i want to modify this functions only.

i have encountered the gloomy weekend....

----- Original Message -----
From: "Norbert Klasen" <norbert.klasen@daasi.de>
To: "Yunhwan Kang" <vanora@grtg.com>; <openldap-software@OpenLDAP.org>
Sent: Thursday, September 20, 2001 9:06 PM
Subject: Re: LDAPv2 vs LDAPv3 & UTF-8


>
>
> --On Donnerstag, 20. September 2001 18:43 +0900 Yunhwan Kang
> <vanora@grtg.com> wrote:
>
> >
> > Hello.
> >
> > I used till LDAPv2.
> >
> > and i use Korean Language with EUC_KR character set.
> >
> > When i use LDAPv2(openldap version 1.2.9), i have no problem with
> > character set. but this time, When i change the server LDAPv3
> > compliant(openldap version 2.0.6), the problem occurred.
>
> LDAPv3 requires that all values of attributetyes with the DirectoryString
> syntax be encoded as UTF-8.
>
> > at first, i have no encoding scheme for storing multi-byte character.
> > that is, My Linux Box has korean locale, my string with korean character
> > is stored without UTF-8 encoding. When i use the program in linux such
> > as ldapsearch, any other my own program(this is also ldap client), it has
> > no problem. but, Whe i use Outlook Express in Windows Platform, Outlook
> > client can't search entry. so i capture the packet from outlook, and i
> > noticed that the search string is encoded with UTF-8.
> > then, i have a question for solving this problem.
> >
> > 1. in the ldap database, should i encode values with multi-byte
> > characters to UTF-8?
>
> Yes
>
> > 2. in the schema file, many attributes are defined
> > as UTF-8 string, should i encode all the values defined as UTF-8?
>
> I don't know what you exactly mean by this. (ASCII is a subset of UTF-8. So
> there is no need to recode such values)
>
> > 3. don't openldap server check encoding type for UTF-8 defined
> attributes?
>
> OpenLDAP 2.0.x ensures that values form a correct UTF-8 string.
>
> --
> Norbert Klasen
> DAASI International GmbH phone: +49 7071 29 70336
> Wilhelmstr. 106 fax: +49 7071 29 5114
> 72074 Tübingen email: norbert.klasen@daasi.de
> Germany web: http://www.daasi.de
>
>
>
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp