Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C9989C44 for ; Wed, 25 Apr 2012 21:56:39 +0000 (UTC) Received: (qmail 94495 invoked by uid 500); 25 Apr 2012 21:56:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 94375 invoked by uid 500); 25 Apr 2012 21:56:39 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 94366 invoked by uid 99); 25 Apr 2012 21:56:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 21:56:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 21:56:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 02F1540E9B9 for ; Wed, 25 Apr 2012 21:56:18 +0000 (UTC) Date: Wed, 25 Apr 2012 21:56:18 +0000 (UTC) From: "Julius Davies (JIRA)" To: issues@commons.apache.org Message-ID: <1282641664.2749.1335390978025.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1172263661.1545.1335379099948.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CODEC-140) isBase64 returns true for any UTF8 string MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CODEC-140?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13262= 165#comment-13262165 ]=20 Julius Davies commented on CODEC-140: ------------------------------------- "Hello" is a valid Base64 encoding. Not all UTF-8 strings return true. C= onsider the following: {code} /* Prints the following: Hello: true Ol=C3=A9! false Hello! false */ System.out.println("Hello: " + Base64.isBase64("Hello")); System.out.println("Ol=C3=A9! " + Base64.isBase64("Ol=C3=A9!")); System.out.println("Hello! " + Base64.isBase64("Hello!")); {code} =20 > isBase64 returns true for any UTF8 string > ----------------------------------------- > > Key: CODEC-140 > URL: https://issues.apache.org/jira/browse/CODEC-140 > Project: Commons Codec > Issue Type: Bug > Affects Versions: 1.6 > Environment: windows/linux > Reporter: Mohit Anchlia > > I just called Base64.isBase64("Hello") for instance and it returns true. = I thought it would return true only if it is valid base64 encoded string. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira