I had found the encode from java.net.URLEncoder. However, I still couldn't get 
any result for solrj client. Is there any different usage for solrj between 
English and other languages?





________________________________
From: Xue-Feng Yang <just4l...@yahoo.com>
To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
Sent: Sunday, September 18, 2011 12:56:44 PM
Subject: Re: Tomcat unicode problems with IE 9, Firefox 6 and solrj client 

The first returned link for Firefox 6 is the same as the returned link for IE 
9. I was misread.

So the encode is this one. Anyone knows what it is.



________________________________
From: Xue-Feng Yang <just4l...@yahoo.com>
To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
Sent: Sunday, September 18, 2011 12:48:31 PM
Subject: Tomcat unicode problems with IE 9, Firefox 6 and solrj client 

Now I moved to Tomcat 6 for another round testing. 


All English cores are OK for IE 9,  Firefox 6  and solrj client.

When I tested with Chinese cores, IE 9 is OK whatever I played on it. 


Firefox 6 is a little different:

1) If I set Query String to "content:耶和华" without qotations in page 
http://localhost:18080/solr/cuv/admin/, I had return

<response><lst name="responseHeader"><int name="status">0</int><int 
name="QTime">1</int><lst name="params"><str name="indent">on</str><str 
name="start">0</str><str name="q">content:耶和华</str><str 
name="rows">10</str><str name="version">2.2</str></lst></lst><result 
name="response" numFound="5908" start="0"><doc><str name="id">申命记 
2:2</str></doc><doc><str name="id">出埃及记 13:1</str></doc><doc><str 
name="id">出埃及记 14:1</str></doc><doc><str name="id">出埃及记 
16:11</str></doc><doc><str name="id">出埃及记 25:1</str></doc><doc><str 
name="id">出埃及记 30:11</str></doc><doc><str name="id">出埃及记 
30:17</str></doc><doc><str name="id">出埃及记 30:22</str></doc><doc><str 
name="id">出埃及记 31:1</str></doc><doc><str name="id">出埃及记 
31:12</str></doc></result></response>


the link went to 
http://localhost:18080/solr/cuv/select/?q=content%3A%E8%80%B6%E5%92%8C%E5%8D%8E&version=2.2&start=0&rows=10&indent=on
and %E8%80%B6%E5%92%8C%E5%8D%8E is visible as 耶和华。

2) If I refreshed, it kept the same.

3) If I highlighted the link and placed Enter key, then the returned link was 
http://localhost:18080/solr/cuv/select/?q=content%3A%D2%AE%BA%CD%BB%AA&version=2.2&start=0&rows=10&indent=on  
 which was different from the above link. The returned page was

<response><lst name="responseHeader"><int name="status">0</int><int 
name="QTime">1</int><lst name="params"><str name="indent">on</str><str 
name="start">0</str><str name="q">content:Ү�ͻ�</str><str 
name="rows">10</str><str name="version">2.2</str></lst></lst><result 
name="response" numFound="0" start="0"/></response>

Actually, in IE 9, the returned link is always 

http://localhost:18080/solr/cuv/select/?q=content%3A%E8%80%B6%E5%92%8C%E5%8D%8E&version=2.2&start=0&rows=10&indent=on

which is different from both of Firefox 6.

For solrj client, I tested many ways to encode, but all return no results.
What is the right encode way? Any help is welcome.

Reply via email to