From: Peter M. <pet...@ma...> - 2002-01-10 04:40:42
|
Hi, On Tuesday 08 January 2002 17:27, you wrote: > > Characters with codes > 127 have UTF8 encodings that > > consist of 2 or more bytes that have all codes > 127. > > Since these characters are legal in LDAPv3 DNs they should > > not get escaped. > True, assuming the DN given is UTF8, which it should be with > LDAPv3 but not v2 Iin that case, adding an option called "version" to split_dn (and eventually canonical_dn) mit help to be absolutely compatible with the old behaviour. Depending on "version" the quoting of special charactes can be done (version not given or version <=3D 2) or not done (version >=3D3). canonical_dn simply has to pass the option to split_dn But maybe this is making things too complicated ;-)) > But the escaping should be done on the basis of the character being > printable. Net::LDAP makes a bad assumption here. Hmmm, ... "Printability" may depend heavily on your terminal settings or your application.=20 On (almost )any 8 bit computer UTF8 encoded characters are printable, since UTF8 was designed to convert Unicode characters into variable length 8bit chunks. So, I wopuld suggest to - at least for LDAPv3 - leave out the encodiung of characters in the range from 128 - 255. Yours Peter --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@is... 97072 W=FCrzburg | Tel: 0931/14721 PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 |