Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 395785

Summary: Remote request for Japanese search term does not return correct result set
Product: [Eclipse Project] Platform Reporter: Soveran <yxzhong>
Component: User AssistanceAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ChrisAustin, curtis.windatt.public, pwebster
Version: 3.4.2Keywords: helpwanted
Target Milestone: 4.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Use the two plugins and see the result in jpg file
none
Patch to remove unnessary decode() call. none

Description Soveran CLA 2012-12-05 02:05:28 EST
Created attachment 224291 [details]
Use the two plugins and see the result in jpg file

This was found originally on IEHS343, but we never heard of such usage, turns out it's a EHS' functionality, so I tried in EHS342, also have the issues, user want us to support this functionality, could someone help to look at it? below quote user's description in our DB:

This problem was discovered by the Rhapsody team.  Rhapsody uses the Eclipse Help System with a remote connection pointing to their public IEHS InfoCenter.  When searching a keyword in the Japanese locale in the local Eclipse Help System, a request is made to the public InfoCenter.  This request does not return the correct hits, and so the user cannot find all content related to the search.

For example, we can search directly on the public IC using the page: http://pic.dhe.ibm.com/infocenter/rhaphlp/v8/index.jsp?lang=ja and the term: ドメイン
We will get 29 hits.

If we browse to the remote help search URL: http://pic.dhe.ibm.com/infocenter/rhaphlp/v8/search?phrase=ドメイン&lang=ja
We get 0 hits. 


Also find the testing plugins and testing result in the attachment.
Comment 1 Curtis Windatt CLA 2012-12-05 13:15:19 EST
As far as I can tell, you haven't described an issue with Eclipse.  The search functionality on info center is returning different results based on the url you are searching from?

Closing as NOT_ECLIPSE.  If this is a problem with the eclipse help system, please reopen and explain where the issue might be.  Unfortunately there are no active user assistance committers to ask.
Comment 2 Soveran CLA 2012-12-06 03:08:55 EST
(In reply to comment #1)
> As far as I can tell, you haven't described an issue with Eclipse.  The
> search functionality on info center is returning different results based on
> the url you are searching from?
> 
> Closing as NOT_ECLIPSE.  If this is a problem with the eclipse help system,
> please reopen and explain where the issue might be.  Unfortunately there are
> no active user assistance committers to ask.

The issue is that by using URL ” http://pic.dhe.ibm.com/infocenter/rhaphlp/v8/search?phrase=ドメイン&lang=ja“  should return the same result with User directly search "ドメイン" in "Search” field which will get 29 hits according to User's saying.
Comment 3 Chris Austin CLA 2012-12-06 09:21:39 EST
This functionality does relate to the Help System, as far as I can tell.  The problem here is that an Eclipse client can connect to other infocenters using Window -> Preferences -> Help -> Content.  When a user performs a search in the Eclipse client, Eclipse has to check each remote connection stored in the above preferences to see if the search has any hits on the remote infocenters.  The URL eclipse uses to perform the remote searching is the help/search?phrase=x URL.
Comment 4 Paul Webster CLA 2012-12-10 12:34:42 EST
No one is watching this component at the moment.  We would consider a patch if supplied.

PW
Comment 5 Chris Austin CLA 2012-12-10 12:38:07 EST
Yeah I am looking at it now, I can commit a patch if I figure it out (and if I remember how to use git)
Comment 6 Chris Austin CLA 2012-12-11 11:45:00 EST
Created attachment 224582 [details]
Patch to remove unnessary decode() call.

OK, it looks like there is an unnecessary call to URLCoder.decode() in SearchServlet.java:

phrase = URLCoder.decode(phrase);

The decode method creates a new decoded String in UTF-8, which works fine when searching in en, but creates a corrupted String in other locales like ja.  I have done some additional testing, and it looks like the text is already passed in decoded, both in the ja and en cases.  I have tested a variety of special characters, and they are all passed in unencoded.

Removing the call to URLCoder.decode() allows the correct result set to be returned.  I have created a patch for this issue - since I am a little rusty on my committing, is there anything else that needs to happen before I (or someone else) commits this fix for 4.3?
Comment 7 Paul Webster CLA 2012-12-11 13:04:01 EST
That line showed up during bug 122967 originally.

PW
Comment 8 Paul Webster CLA 2012-12-11 13:06:49 EST
(In reply to comment #6)
> 
> Removing the call to URLCoder.decode() allows the correct result set to be
> returned.  I have created a patch for this issue - since I am a little rusty
> on my committing, is there anything else that needs to happen before I (or
> someone else) commits this fix for 4.3?

We're in 4.3M4 this week, so you can go ahead and commit it to master on Monday.

PW
Comment 9 Paul Webster CLA 2012-12-17 14:11:29 EST
(In reply to comment #6)
> Created attachment 224582 [details]
> Patch to remove unnessary decode() call.

OK, master is open.

PW
Comment 10 Chris Austin CLA 2013-01-11 15:15:34 EST
Committed to master, closing.
Comment 11 Soveran CLA 2013-01-18 02:06:18 EST
seems like this patch doesn't work for IE8, did you get a chance to check that? is there any fix you can provide?