Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 569 invoked from network); 8 Apr 2009 18:16:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2009 18:16:39 -0000 Received: (qmail 96230 invoked by uid 500); 8 Apr 2009 18:16:38 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 96152 invoked by uid 500); 8 Apr 2009 18:16:38 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 96106 invoked by uid 99); 8 Apr 2009 18:16:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 18:16:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 18:16:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3AFAE234C48D for ; Wed, 8 Apr 2009 11:16:13 -0700 (PDT) Message-ID: <1429496460.1239214573240.JavaMail.jira@brutus> Date: Wed, 8 Apr 2009 11:16:13 -0700 (PDT) From: "Robin Fernandes (JIRA)" To: notifications@ant.apache.org Subject: [jira] Created: (IVY-1060) ApacheURLLister.retrieveListing() fails if the encoding of the URL list is different from the default encoding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org ApacheURLLister.retrieveListing() fails if the encoding of the URL list is different from the default encoding -------------------------------------------------------------------------------------------------------------- Key: IVY-1060 URL: https://issues.apache.org/jira/browse/IVY-1060 Project: Ivy Issue Type: Bug Components: Core Affects Versions: 2.0, 2.1.0, trunk Environment: Observed on z/OS Reporter: Robin Fernandes ApacheURLLister.retrieveListing() assumes that the list of URLs is encoded in the same encoding as the system's default encoding. The problematic code is: {code} BufferedReader r = new BufferedReader(new InputStreamReader(URLHandlerRegistry.getDefault().openStream(url))); String htmlText = FileUtil.readEntirely(r); {code} FileUtil.readEntirely() converts the the content of the BufferedReader r to a String. Because no encoding is specified in the InputStreamReader constructor, the default encoding is used. If the default encoding does not match the actual encoding of the data read from url, htmlText ends up as a garbage String and the URL pattern matcher fails. This causes an issue on z/OS, where the default encoding is EBCDIC (e.g. IBM-1047) but the data containing the list of URLs is typically retrieved from the network as ASCII (ISO-8559-1). A workaround could be to specify the system property -Dfile.encoding=ISO-8559-1 on the command line, but this is a bit of a big hammer. In particular, it is not suitable when Ivy is used within an application where we don't to assume all input is ISO-8559-1. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.