Hi,

> I do not have strings in different character sets. While there may
> exist programs that do, most do not.
> The way I added to the API allowes your very uncommon case too.

That is only an assumption, isn't it ?!
IMHO a general API should not make assumptions about the "rareness"
of use cases.

> But I have no strings in Latin2. I always you ONE character set inside
> my applications. It makes no sense to complicate the world by having
> many at the same time.

You do not have 2 character sets if you use UTF-8 for the strings that need 
to be UTF8-encoded for LDAP anyway. It's only one: UTF8

> Yes it will. But if you look at my current use the local character set
> is Latin1 and no data in my LDAP directory will contain anything
> with characters outside Latin1.
> I expect it is the same in most places in the world - you use data
> that is handled by the local character set in use.

This is an asumption too, isn't it ?

> >If you have to take Unicode anyway, you now can choose between
> >the various representations. So, why not taking UTF-8 if it is the
> >optimal encoding for perl-ldap (since it does not need any mapping) ?
>
> UTF-8 is not optimal for character handling.

Are you sure about that ?
Perl 5.6+ uses UTF8-encoding of characters internally for the new "character 
semantics" (the new semantics of strings that allows a single character to
use more than a byte).

That is another advantage of my approach with UTF8:
If Perl and perl-ldap support it correctly, your application can do the 
character set conversion with PerlIO on the user interface side, then work 
with the regular Perl strings in character semantics [with all the amenities 
that Perl offers like case-ignoring regexes, lc(), uc(), ...] and finally 
pass that values to perl-ldap (or the other way around)

I need to say the "If Perl and perl-ldap support it correctly" parts
because I know that Perl 5.6.x has some issues with the Unicode support
(and unfortunately I do not have access to a 5.8.x machine to test it).
On the perl-ldap side I remember some discussions on the ML that
there were some issues with "character semantics".
I don't know If they are still there ?

Peter
-- 
Peter Marschall
eMail: [EMAIL PROTECTED]

Reply via email to