directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tino Schwarze <>
Subject Re: UTF-8 woes
Date Fri, 29 Dec 2006 18:13:37 GMT
On Fri, Dec 29, 2006 at 05:43:13PM +0100, Emmanuel Lecharny wrote:

> You will have to be a little bit more explicit... How do you build your RDN?

To be honest, I'm not yet familiar with LdapDN, Rdn etc....
I built a DN for SearchResult like this:

      LdapDN _dn = new LdapDN();

      // iterate over primary key attributes, then

That was actually the easiest way I could figure out.

> FYI, it is supposed to be a UTF-8 encoded String, so if you are to code an
> ä, you will have to :

My application is already UTF-8 save.

> - create a byte array containing it's counterpart (0xC3 0xa4) and do a new
> String( byteArray, "UTF-8" ) before passing it to the RDN constructor
> - OR do a new RDN( "\u00e4" );
> never do a new RDN( "ä" ), because then the String will be considered as
> ISO-8859-1 encoded  string (at least in Germany or in France, not in Turkey
> :)

That would be equivalent to new RDN (new String (byteArray, "UTF-8")).

> Does it help you to figure out what can be the probem ?

Not yet...




View raw message