directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSTUDIO-963) Why UTF-8 is escaped in DN strings since 2.0.0?
Date Mon, 25 Nov 2013 09:57:36 GMT

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13831328#comment-13831328
] 

Emmanuel Lecharny commented on DIRSTUDIO-963:
---------------------------------------------

I confirm this is a bug.

o create a new entry
o select 'person' as an ObjectClass
o add a 'cn' which value is 'Lécharny'
o the DN is converted to a String representation of the RDN, where the 'é' is escaped : cn=L\C3\A9charny,ou=system

This conversion should never occur at this point. RFC 4514 is pretty clear about that :

distinguishedName = [ relativeDistinguishedName *( COMMA relativeDistinguishedName ) ]
relativeDistinguishedName = attributeTypeAndValue*( PLUS attributeTypeAndValue )
attributeTypeAndValue = attributeType EQUALS attributeValue
attributeValue = string / hexstring
string =   [ ( leadchar / pair ) [ *( stringchar / pair )( trailchar / pair ) ] ]
leadchar = LUTF1 / UTFMB
stringchar = SUTF1 / UTFMB
trailchar  = TUTF1 / UTFMB

and from RFC 4512 :
UTFMB   = UTF2 / UTF3 / UTF4
UTF2    = %xC2-DF UTF0
UTF3    = %xE0 %xA0-BF UTF0 | %xE1-EC 2(UTF0)  | %xED %x80-9F UTF0 | %xEE-EF 2(UTF0)
UTF4    = %xF0 %x90-BF 2(UTF0) | %xF1-F3 3(UTF0) | %xF4 %x80-8F 2(UTF0)
UTF0    = %x80-BF

> Why UTF-8 is escaped in DN strings since 2.0.0?
> -----------------------------------------------
>
>                 Key: DIRSTUDIO-963
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-963
>             Project: Directory Studio
>          Issue Type: Question
>          Components: studio-ldifeditor
>    Affects Versions: 2.0.0-M8 (2.0.0.v20130628)
>            Reporter: Dmitri Chubarov
>              Labels: newbie
>         Attachments: Screenshot-Rename Entry - 1.5.3.png, Screenshot-Rename Entry - 2.0.0-M8.png
>
>
> I have a directory that includes many DNs containing UTF-8 characters. I expect the characters
to be displayed correctly in the LDAP browser tree. The server claims to support LDAP v3.
> Recently I installed Apache Directory Studio 2.0.0-M8 and realized that new entries created
with the Directory Studio have UTF-8 characters escaped when a DN is created, e.g. "TESTСкаж...,dc=ru"
is replaced with "TEST\D0\A1\D0\BA\D0\B0\D0\B6...,dc=ru".
> Since escaped secuences make the tree illegible in the LDAP Browser I had to manualy
rename new entries using ldapmodrdn utility from OpenLDAP distribution.
> I have tested few prior versions of Apache Directory Studio. Here is a summary of the
results:
> 1.5.3 - entries created with UTF-8 characters in DN as expected.
> 2.0.0-M3 - the Directory fails to load with ArrayIndexOutOfBounds exceptions
> 2.0.0-M7, 2.0.0-M8 when DN is formed by the Directory Studio all UTF-8 characters are
escaped.
> Is this an expected behaviour or is this a regression? If this behaviour is expected
is there a way to get UTF-8 characters back into the DNs?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message