Hello,
Has anyone got problems parsing LDIF file using Netscape Java LDAP
classes (4.1) because of endcoding? I try to read entries from the full
directory content produced by DirX (Siemens) directory server and get
the exception (see below).
People who produced this file are sure that it is in UTF-8 encoding. I
found that parsing stops after it reaches character "\370" (as displayed
in emacs). I have 3 suggestions:
1. LDIF file is not UTF-8.
2. There is a bug on Java-side.
3. I do something wrong.
Any ideas?
Thanks,
Vilmantas
Exception in thread "main" sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:152)
at
java.io.InputStreamReader.convertInto(InputStreamReader.java:137)
at java.io.InputStreamReader.fill(InputStreamReader.java:186)
at java.io.InputStreamReader.read(InputStreamReader.java:249)
at java.io.BufferedReader.fill(BufferedReader.java:139)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at netscape.ldap.util.LDIF$LineReader.readLine(LDIF.java:670)
at netscape.ldap.util.LDIF.parse_ldif_content(LDIF.java:172)
at netscape.ldap.util.LDIF.parse_ldif_record(LDIF.java:159)
at netscape.ldap.util.LDIF.nextRecord(LDIF.java:110)