Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3539AE27E for ; Tue, 27 Nov 2012 21:59:01 +0000 (UTC) Received: (qmail 6963 invoked by uid 500); 27 Nov 2012 21:58:59 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 6873 invoked by uid 500); 27 Nov 2012 21:58:59 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 6831 invoked by uid 99); 27 Nov 2012 21:58:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2012 21:58:59 +0000 Date: Tue, 27 Nov 2012 21:58:59 +0000 (UTC) From: "James Dyer (JIRA)" To: dev@lucene.apache.org Message-ID: <2064477618.29574.1354053539679.JavaMail.jiratomcat@arcas> In-Reply-To: <1581624083.7481.1296747148907.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-2347) Use InputStream and not Reader for XML parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504989#comment-13504989 ] James Dyer commented on SOLR-2347: ---------------------------------- Uwe, Does your concern here entirely have to do with when DIH is indexing XML files? > Use InputStream and not Reader for XML parsing > ---------------------------------------------- > > Key: SOLR-2347 > URL: https://issues.apache.org/jira/browse/SOLR-2347 > Project: Solr > Issue Type: Bug > Components: contrib - DataImportHandler > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Fix For: 4.1 > > > Followup to SOLR-96: > Solr mostly uses java.io.Reader and passes this Reader to the XML parser. According to XML spec, a XML file should be initially seen as a binary stream with a default charset of UTF-8 or another charset given by the network protocol (like Content-Type header in HTTP). But very important, this default charset is only a "hint" to the parser - mandatory is the charset from the XML header processing inctruction. Because of this, the parser must be able to change the charset when reading the XML headers (possibly also when seeing BOM markers). This is not possible if the XML parser gets a java.io.Reader instead of java.io.InputStreams. SOLR-96 already fixed this for the XmlUpdateRequestHandler and the DocumentAnalysisRequestHandler. This issue should fix the rest to be conforming to XML-spec (open schema.xml and config.xml as InputStream not Reader and others). > This change would not break anything in Solr (perhaps only backwards compatibility in the API), as the default used by XML parsers is UTF-8. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org