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

Re: Double byte in OPENLDAP, anyone tried this?



The term "double-byte" is confusing.  Some use it to describe DBCS ("Double Byte Character Set")  where characters may be one or two bytes.  If the first character is within a specified range (for example 0x81 - 0x84) then the next byte is also used to determine the character.    Each country or locale has a different mapping of byte values to characters.

Some use it when referring to unicode where every character is 16 bits long.  There is just one standard unicode table mapping 16-bit values to characters.

As John Kristian said, LDAP expects strings in UTF-8, which is just an encoding of unicode.  
In UTF8, each character is one, two, or three bytes long.  A simple algorithmic encoding converts a 16-bit unicode character into the UTF8 byte or bytes.

I'm not aware of an IETF standard C API to convert from unicode to UTF8, or from local code page to Unicode.  (Please correct me if I'm wrong.)  Microsoft and Novell each have their own set of APIs in the 386  world.

  Dave Steck


>>> "syw" <ywshum@2bsure.com> 12/30/99 08:08PM >>>
hi there,

I'm now working on projects for Korean, Japan and Taiwan clients. They use "double bytes"
to represent their characters in computer. 

I tried storing the name, surname and addresses in "double bytes" characters into openldap
but when i tried to view them with an ldap client, say netscape, the characters does not display properly
even though i have the Chinese reader NJ Star turn on.

I did further research and found out that thouse double bytes can have ascii value beyond 127 while
a normal string char's ascii char will be less than 127.

Basically, it does not work. 

Anyone have ever tried storing double byte characters into openldap? Or what other directory software should i use
in order to support double byte?

With the potential market in China, it is a big disadvantage for openldap not being able to support double byte.

regards,
syw