Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 20645 invoked from network); 25 Jul 2007 18:37:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2007 18:37:07 -0000 Received: (qmail 98488 invoked by uid 500); 25 Jul 2007 18:36:56 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 98404 invoked by uid 500); 25 Jul 2007 18:36:56 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 98214 invoked by uid 99); 25 Jul 2007 18:36:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 11:36:55 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 11:36:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 595AF7141F6 for ; Wed, 25 Jul 2007 11:36:32 -0700 (PDT) Message-ID: <32808491.1185388592361.JavaMail.jira@brutus> Date: Wed, 25 Jul 2007 11:36:32 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Assigned: (DIRSERVER-1009) ASN.1 decoder does not use UTF-8 encoding for strings In-Reply-To: <14475320.1185386371254.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSERVER-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny reassigned DIRSERVER-1009: -------------------------------------------- Assignee: Emmanuel Lecharny > ASN.1 decoder does not use UTF-8 encoding for strings > ----------------------------------------------------- > > Key: DIRSERVER-1009 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1009 > Project: Directory ApacheDS > Issue Type: Bug > Components: asn1 > Affects Versions: 1.5.0 > Environment: JDK 1.6, WinXP > Reporter: Klemen Zagar > Assignee: Emmanuel Lecharny > > Currently, LDAP ASN.1 decoder transforms byte[] to String via calls such as: > String any = new String( tlv.getValue().getData() ); > (source: /ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java, line 74) > This uses some default encoding, though according to LDAP RFC, UTF-8 should always be used (http://www.rfc-editor.org/rfc/rfc2251.txt, section 4.1.2). > I recommend that the following code be used for converting byte[] to String: > // static variable containing the UTF8 encoder > private static final Charset UTF8 = Charset.forName("UTF8"); > // wherever byte[]->string conversion is needed > String any = UTF8.decode(tlv.getValue().getData()).toString(); > From user's perspective, the problem is that non-ASCII characters in search filters are messed up, and search doesn't return any results. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.