On Dec 17, 2007 11:04 AM, Jörg Kiegeland <[EMAIL PROTECTED]> wrote:
> > When you use POST, you can and should specify the charset.  If you are
> > doing this, it should work.
> >
>
> Where can I do this? Have you any example? I have a QueryRequest
> instance, a SolrQuery and a SolrServer instance
> and set the query by solrQuery.setQuery(query) where "query" is a String
> containing Japanese characters.

Ah, sorry, I hadn't realized you were using SolrJ.

It looks like SolrJ uses percent encoded UTF8 in the POST body for
parameters, just as it does in the URL.
Does anyone know if this double-encoding (percent encoding of UTF-8
bytes) is a standard for application/x-www-form-urlencoded?
Is there any reason we shouldn't just use UTF8 directly and declare
that in the Content-Type?

$ nc -l -p 8983
POST /solr/select HTTP/1.1
User-Agent: Solr[org.apache.solr.client.solrj.impl.CommonsHttpSolrServer] 1.0
Host: localhost:8983
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

q=features%3Ah%C3%A9llo&wt=xml&version=2.2


-Yonik

Reply via email to