Accented chars problem in DN when exporting in LDIF

Suggestions, wishes, feedbacks

Moderator: Support

Accented chars problem in DN when exporting in LDIF

Postby pchavaillaz » Thu Sep 18, 2003 11:14 am

When LDIF exporting, DN containing accented characters are not Base64 encoded preventing any future LDIF import. The funniest is that the the cn as attribute is properly exported as Base64 string!


For example:
dn: cn=Akten- und Gesch├дftsverwaltung,ou=STAB,ou=Bundeskanzlei,ou=Bundesrat,o=Admin,c=CH
objectClass: organizationalRole
objectClass: adminOrganizationalRoleAux
objectClass: top
cn:: QWt0ZW4tIHVuZCBHZXNjaMOkZnRzdmVyd2FsdHVuZw==
roleOccupant: cn=xxx,ATHVSD,ou=Person,ou=STAB,ou=Bundeskanzlei,ou=Bundesrat,o=Admin,c=CH
adminOrderSK: 000500
pchavaillaz
 
Posts: 16
Joined: Mon Aug 25, 2003 7:19 am
Location: Bern, Switzerland

Postby Support » Thu Sep 18, 2003 1:03 pm

Everything seems to be correct according to the RFC2849

4) Any dn or rdn that contains characters other than those
defined as "SAFE-UTF8-CHAR", or begins with a character other
than those defined as "SAFE-INIT-UTF8-CHAR", above, MUST be
base-64 encoded. Other values MAY be base-64 encoded. Any
value that contains characters other than those defined as
"SAFE-CHAR", or begins with a character other than those
defined as "SAFE-INIT-CHAR", above, MUST be base-64 encoded.
Other values MAY be base-64 encoded.


where

SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-7F
; any value <= 127 decimal except NUL, LF,
; and CR

SAFE-INIT-CHAR = %x01-09 / %x0B-0C / %x0E-1F /
%x21-39 / %x3B / %x3D-7F
; any value <= 127 except NUL, LF, CR,
; SPACE, colon (":", ASCII 58 decimal)
; and less-than ("<" , ASCII 60 decimal)

SAFE-UTF8-CHAR = SAFE-CHAR / UTF8-2 / UTF8-3 /
UTF8-4 / UTF8-5 / UTF8-6

SAFE-INIT-UTF8-CHAR = SAFE-INIT-CHAR / UTF8-2 / UTF8-3 /
UTF8-4 / UTF8-5 / UTF8-6
Support
 
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Postby Support » Thu Sep 18, 2003 1:42 pm

We've just understood the reason of the problem you've came across.

You are using LA 3.0 beta, and there is a bug with LDIF import, it's not an LDIF export bug. The file you have exported could be imported back using LA 2.X without problems.
Support
 
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Postby pchavaillaz » Thu Sep 18, 2003 2:26 pm

Not only, I have registered accented characters problems with both v2 and v3 beta !
As a matter of fact, the example I have posted is an LDIF export from v2 and I cannot re-import it in my directory using v2 !

Considering your interpretation of RFC2849, I still don't understand why the exported DN is either not Base64 encoded or at least shows exactly the accented characters from the directory ?

Originaly, the "Gesch├дftsverwaltung" shall be "Geschфftsverwaltung"
pchavaillaz
 
Posts: 16
Joined: Mon Aug 25, 2003 7:19 am
Location: Bern, Switzerland

Postby Support » Thu Sep 18, 2003 2:53 pm

All the symbols in an LDIF file must be encoded using UTF-8. LA v.2 does this when you export data. LA expects all the data is encoded using UTF-8 when performs import, however does not check it due to performance reasons.

"Geschфftsverwaltung" is not a valid UTF-8 string. Encoded with UTF-8 it looks like "Gesch&#1043;дftsverwaltung".

UTF-8 is so called multibyte string and each unicode symbol takes from 1 to 6 non-unicode symbols. In your example letter 'ф' encoded to "&#1043;д" (0xC3, 0xA4)

For more information about UTF-8 please turn to the RFC 2044.

If you create your LDIF files by hand we suggest you use UTF-8 enabled text editor.
Support
 
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Postby pchavaillaz » Thu Sep 18, 2003 3:02 pm

This is all my problem, the LDIF export sample I published IS an LDIF export from LA v2 using Siemens DirX directory !

Thus my doubts about the way the LA v2 exports the DN in LDIF when it contains accented characters.
pchavaillaz
 
Posts: 16
Joined: Mon Aug 25, 2003 7:19 am
Location: Bern, Switzerland

Postby Support » Fri Sep 19, 2003 6:34 am

You might be using v.2.0. Don't you? UTF-8 support was introduced in 2.1. Anyway please <a href="mailto:support@ldapadministrator.com">send us</a> an LDIF example of wrong export.
Support
 
Posts: 895
Joined: Sun Aug 12, 2001 12:00 am

Postby pchavaillaz » Fri Sep 19, 2003 8:00 am

Nope, I'm running LA v2.53 build 625.

Just sent you a sample exported LDIF file with objects showing problem.

Thanks for your support
pchavaillaz
 
Posts: 16
Joined: Mon Aug 25, 2003 7:19 am
Location: Bern, Switzerland


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests