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 9C902DBC8 for ; Sun, 6 Jan 2013 01:24:13 +0000 (UTC) Received: (qmail 98930 invoked by uid 500); 6 Jan 2013 01:24:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 98780 invoked by uid 500); 6 Jan 2013 01:24:13 -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 98762 invoked by uid 99); 6 Jan 2013 01:24:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2013 01:24:13 +0000 Date: Sun, 6 Jan 2013 01:24:12 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CODEC-164) Issue in populating junk characters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CODEC-164?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved CODEC-164. ------------------------ Resolution: Invalid The test code uses UTF-8 to convert the input string to bytes: inputBuffer =3D input.getBytes("UTF-8"); but then uses the default encoding to convert the bytes back to a string: value =3D bos.toString(); // <=3D=3D default used here System.out.println("Decompressed String :-"+value); Changing this to=20 value =3D bos.toString("UTF-8"); fixes the issue. As the source file is actually in ISO-8859-1 the test should actually be us= ing that for the byte<=3D>String conversions. This also fixes the issue. =20 > Issue in populating junk characters > ----------------------------------- > > Key: CODEC-164 > URL: https://issues.apache.org/jira/browse/CODEC-164 > Project: Commons Codec > Issue Type: Bug > Affects Versions: 1.7 > Environment: Windows XP, Weblogic, Oracle > Reporter: Priyesh Jain > Attachments: Base64JunkTest.java > > Original Estimate: 168h > Remaining Estimate: 168h > > While decompressing the compressed String (which contains special charact= ers like " =C3=A7 or =C3=B5 or =C3=A3 " )with API =E2=80=9Corg.apache.commo= ns.codec.binary.Base64=E2=80=9D it is showing garbage values. > While using Base64 API, we have used default encoding type as =E2=80=9CUT= F-8=E2=80=9D. > I have tried this issue with commons-codec-v1.3.jar and commons-codec-v1.= 7.jar also.=20 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira