| Title | Search doesn't support Chinese |
| Date | 17-Mar-2006 15:08:17 EET |
| Version | JSPWiki-2.3.72-alpha |
| Submitter | 张宇 |
| Bug criticality | LightBug |
| Browser version | ie |
| Bug status | ClosedBug |
| PageProvider used | |
| Servlet Container | Tomcat 5.0.28 |
| Operating System | Windows XP |
| URL | Search.jsp |
| Java version | Jdk 1.4.2 |
When submit a Chinese word search,Search.jsp doesn't display it correctly. Change code from: String query = request.getParameter( "query"); to:String query = wiki.safeGetParameter( request, "query"); then search functionality can run right.
Good catch, thanks!
Looking at the current (2.4.100) source of Search.jsp it looks like this still isn't solved.
// Get the search results
Collection list = null;
String query = request.getParameter( "query");
String go = request.getParameter("go");
It shouldn't take long to implement the suggested fix, is it ?
--HarryMetske, 10-Mar-2007
[Waiting for fix implementation |Bugs Waiting For Provided Fix To Be Implemented] ===> not anymore --HarryMetske, 18-Mar-2007
We have fixed this by explictly setting the request encoding in WikiJSPFilter. So this should no longer be a problem. Closing...
--JanneJalkanen, 20-Mar-2007
This actually didn't really solve the problem because setCharEncoding() doesn't affect GET request parameters. One solution is to add METHOD="POST" when the backend generates "<form ...>" or configure Tomcat (if you happen to use Tomcat), see TomcatAndUTF8.
-- Hai-Chen Tu, 2008/5/29