lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Updated: (SOLR-96) Solr should support alternate charsets for XML update messages
Date Thu, 03 Feb 2011 13:39:29 GMT


Uwe Schindler updated SOLR-96:

    Attachment: SOLR-96.patch

Here is a patch to fix this.

The whole problem *everywhere* in solr (even for config files) is, that XML files per spec
are not intended to be handled a "text", they are binary!!! (this is why the MIME type is
application/xml and text/xml was deprecated by IANA).

The APIs provided by Java that take are only convenience methods to support
parsing strings or database contents that are in text contents with already detected CharSet.
XML files from unknown source must always be parsed as a byte-stream. Charsets determined
from HTTP headers may only be used as a hint to the parser.

The patch changes the XmlUpdateRequestHandler to use the byte stream and pass the charset
from Content-Type header as a hint to the parser.

This patch still misses a test.

In general we should review all XML parsing in solr and never ever use!!!

> Solr should support alternate charsets for XML update messages
> --------------------------------------------------------------
>                 Key: SOLR-96
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>            Reporter: Hoss Man
>            Assignee: Uwe Schindler
>         Attachments: SOLR-96.patch
> At the moment, the XML messages sent to solr to add/delete documents must be in UTF-8.
 The imput processing should be changed to determine the charset based on the HTTP header
info, or the XML contents.
> Background and refrence material...

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message