[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: JDBC ldap bridge: Fix for UTF8-characters



I note that if you would like this patch considered for inclusion
in JDBC LDAP, you should submitted it using the Issue Tracking
System <http://www.openldap.org/its/>.

Kurt

At 08:22 AM 8/22/2005, Erlend Hamnaberg wrote:
>Fix for previously reported error.
>
>maedhros@conan:~/source/cvs/jdbcldap/src/com/octetstring/jdbcLdap/jndi$ diff -u UnpackResults.java.orig UnpackResults.java
>--- UnpackResults.java.orig     2005-08-22 17:16:48.846116304 +0200
>+++ UnpackResults.java  2005-08-22 16:59:29.807074248 +0200
>@@ -349,7 +349,9 @@
>                        if (bval == null) {
>                                bval = new byte[0];
>                        }
>-                       if (Base64.isLDIFSafe(bval)) {
>+                       if (Base64.isValidUTF8(bval,true)) {
>+                               svals = attrib.getStringValueArray();
>+                       } else if (Base64.isLDIFSafe(bval)) {
>                                svals = attrib.getStringValueArray();
>                        } else {
>                                byteVals = attrib.getByteValueArray();
>
>
>Regards
>Erlend Hamnaberg