directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: [apacheds-tools] dump / import produces error if object to import contains german umlaute (äöüÄÖÜß)
Date Mon, 23 Jul 2007 17:43:53 GMT
Hi Markus,

I created an entry with "sn=Saarbrücken" and exported the entry with
different tools:

ApacheDirectoryStudio: U2FhcmJyw7xja2Vu
ldapsearch: U2FhcmJyw7xja2Vu
JXplorer: U2FhcmJyw7xja2Vu

So it seems that ADStudio exports it correctly.


Some more investigation:

Decoding the BASE-64 String U2FhcmJyw7xja2Vu as exported from ADStudio
and others to its hex representation:

  53 61 61 72 62 72 c3 bc 63 6b 65 6e
  S  a  a  r  b  r  ----- c  k  e  n

"c3 bc" is the UTF-8 character sequence for "ü", see
http://www.utf8-chartable.de.


Decoding the BASE-64 String U2FhcmJy/GNrZW4= as exported from
apacheds-tools to its hex representation:

  53 61 61 72 62 72 fc 63 6b 65 6e
  S  a  a  r  b  r  --

I think "fc" is the problem here. It is the ISO-8859-1 hex code for "ü"
but in LDIF UTF-8 encoding must be used (RFC2849).


We have to check which encoding is used in the apacheds-tools. Could you
please file a Jira?


Kind Regards,
Stefan Seelmann



Markus Pohle schrieb:
> Hi list-users,
> hi Alex,
> 
> 
> using the apacheds-tools.jar that you, Alex, built for me within the
> 1.5.1-snapshot, I found the following error message occuring trying to
> import a ldif file that was exported thru dump command from
> apacheds-tools before.
> 
> Here is what I have done to reproduce:
> 
> 1. created partion called "DouglasHolding" containing the ldap structure
> seen attached at the end of this email.
> 
> 2. created two objects under cn=users,dc=VERWALTUNG,dc=DOUGLASHOLDING
> with the following attributes (as you can see the second entry uses the
> german umlaut 'ü'):
> 
> uid=00440095,cn=users,dc=VERWALTUNG,dc=DOUGLASHOLDING
> cn=00440095, Hagen
> sn=00440095
> 
> uid=00630014,cn=users,dc=VERWALTUNG,dc=DOUGLASHOLDING
> cn=00630014, Saarbrücken
> sn=00630014
> 
> 3. used the command "java -jar apacheds-tools.jar dump -i
> C:\Programme\apacheds-1.5.1-SNAPSHOT -p DouglasHolding -f douglasholding
> out.ldif" to dump the structure of partition DouglasHolding
> 
> 4. used Directory Studio to export the partition DouglasHolding as ldif
> file
> 
> 5. compared the both ldif files and found the following difference:
> 
> apacheds-tools exported the cn as followed: MDA2MzAwMTQsIFNhYXJicvxja2Vu
> directory studio exported the cn as followed:
> MDA2MzAwMTQsIFNhYXJicsO8Y2tlbg==
> 
> apacheds-tools exported the givenName as followed: U2FhcmJy/GNrZW4=
> directory studio exported the givenName as followed: U2FhcmJyw7xja2Vu
> 
> 6. created clean partition with structure seen below and tried to import
> the ldif file created with dump before using the following command:
> java -jar apacheds-tools.jar import -e -f douglasholdingout.ldif
> 
> The output showed the following error message:
> Add of entry uid=00630014,cn=users,dc=VERWALTUNG,dc=DOUGLASHOLDING
> failed for the following reasons provided by the server:
> failed to add entry
> uid=00630014,cn=users,dc=VERWALTUNG,dc=DOUGLASHOLDING: Attribute value
> '00630014, Saarbr?' for attribute 'cn' is syntactically inc
> orrect
> 
> As you can see, the import of the second uid object seems to fail
> because of its german umlaut 'ü'
> 
> 7. did the same test as in '6' with the ldif file created thru export
> from directory studio. with this ldif the import is successful.
> 
> Does anybody can reproduce this behaviour? Is it a bug in Directory
> Studio? If so, I can open a JIRA. If not a bug, what can I do to create
> importable ldifs with the dump command?
> 
> TIA,
> Markus
> 
> 
> 
> 
> 
> A T T A C H M E N T S
> =====================
> 
> LDAP Structure within partition DouglasHolding
> Link: http://www.webunity.de/apacheds-tools/basic-structure.ldif
> 
> ApacheDS-Tools dump ldif file
> Link: http://www.webunity.de/apacheds-tools/apacheds-tools-dump.ldif
> 
> Directory Studio Export ldif file
> Link: http://www.webunity.de/apacheds-tools/directory-studio-export.ldif


Mime
View raw message