summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAnthony Hunter2013-05-22 12:33:17 (EDT)
committer John Arthorne2013-05-23 16:11:16 (EDT)
commit0972051dbbabba94270230ea7a9eb250e9c7cd7e (patch)
tree52c7e1a78e716f8cf9c82f679ddb905fc567b618
parentd27164125065633dbf1f7b5d6eee37d887178235 (diff)
downloadorg.eclipse.orion.server-0972051dbbabba94270230ea7a9eb250e9c7cd7e.zip
org.eclipse.orion.server-0972051dbbabba94270230ea7a9eb250e9c7cd7e.tar.gz
org.eclipse.orion.server-0972051dbbabba94270230ea7a9eb250e9c7cd7e.tar.bz2
[406757] [DBCS4.3] Search results for DBCS files are garbled.v20130523-2011
-rw-r--r--bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/SearchServlet.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/SearchServlet.java b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/SearchServlet.java
index f2b0c8f..33e977a 100644
--- a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/SearchServlet.java
+++ b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/SearchServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -164,6 +164,11 @@ public class SearchServlet extends OrionServlet {
//this seems to be the only way to obtain the JSON response representation
SolrQueryRequest solrRequest = new LocalSolrQueryRequest(core, query.toNamedList());
SolrQueryResponse solrResponse = new SolrQueryResponse();
+ // Added encoding check as per Bugzilla 406757
+ if (httpRequest.getCharacterEncoding() == null) {
+ httpRequest.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+ httpResponse.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+ }
//bash the query in the response to remove user info
NamedList<Object> params = (NamedList<Object>) queryResponse.getHeader().get("params"); //$NON-NLS-1$
params.remove(CommonParams.Q);