I found that it works if I put the code in this way without the URLEncoder req.setParam("literal.title", filename);
Is the URLEncoder doing the encoding from the chinese characters to the string of code like this "%E7%AB%8B%E9".? Regards, Edwin On 19 October 2015 at 11:29, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > Hi, > > I'm using the URLEncoder withg "UTF-8" encoding in SolrJ (code is written > in Eclipse) to index the file name to Solr. The code looks like this. > > req.setParam("literal.title", URLEncoder.encode(filename, "UTF-8")); > > However, what is index in Solr is a string of code like this > "%E7%AB%8B%E9". When I do the system.out.println of the filename in > Eclipse, the full chinese characters is shown. > > What could be the reason that this is happening? > > I'm using Solr 5.3.0, Java 1.8 and Eclipse Juno Service Release 2. > > Thank you for your help. > > Regards, > Edwin >