aMule Bug Tracker - aMule
View Issue Details
0000903aMuleSearchpublic2006-05-28 19:572007-05-09 17:47
DreamerC 
Kry 
normalmajoralways
acknowledgedopen 
2.1.2 
 
Any
0000903: amuleweb failed in CJK keywords
no search results from CJK keywords, but others works fine.
No tags attached.
Issue History
2006-05-28 19:57DreamerCNew Issue
2006-05-28 19:57DreamerCOperating System => Any
2006-05-30 07:19KryNote Added: 0002015
2006-06-03 00:49DreamerCNote Added: 0002022
2006-06-03 01:07DreamerCNote Edited: 0002022
2007-05-08 16:31whoamiNote Added: 0002282
2007-05-08 16:31whoamiNote Edited: 0002282
2007-05-09 16:02KryStatusnew => assigned
2007-05-09 16:02KryAssigned To => Kry
2007-05-09 16:02KryNote Added: 0002283
2007-05-09 16:02KryStatusassigned => acknowledged
2007-05-09 17:47whoamiNote Added: 0002285

Notes
(0002015)
Kry   
2006-05-30 07:19   
CJK?
(0002022)
DreamerC   
2006-06-03 00:49   
(edited on: 2006-06-03 01:07)
CJK = Chinese, Japeness, and Korean

If you run with UTF-8 and Big5 decode, it won't be search in the right way.
it has some results from Big5 in browsers, and shows buggy answers.
UTF-8 shows nothing.

edited on: 06-03-06 01:07
(0002282)
whoami   
2007-05-08 16:31   
Aha. I was right to check out before I add a new bugreport.

I suffered the same problem with DreamerC and I found the remedy just a minute ago.

The remedy is:
1) set "charset=" metadata of all .php and .html in the php-default site template to UTF-8, not iso-8859-1 nor utf nor utf8. It makes the non-US letters broken.
2) on the line 794 in php_core_lib.cpp in webserver:
794: wxString(char2unicode(search)), wxString(char2unicode(ext)), ...
-to-
wxString(UTF82unicode(search)), wxString(char2unicode(ext)), ...
3) recompile, and the webserver shows the right result.

Okay, I admit this remedy might need more testing, but at least it looks ok.

edited on: 05-08-07 16:31
(0002283)
Kry   
2007-05-09 16:02   
Thanks for it, I'll touch it later.
(0002285)
whoami   
2007-05-09 17:47   
Well, my "remedy" works okay so far.. but amuleweb tends to find some files without the keyword, although the occurrence is very few (about 1% of total search). I wonder there IS the keyword but the filename is too long to show in the filename section..

Anyways, there might be another needs to "char~" to "UTF8~" replacements, but I cannot tell because my knowledge of amuleweb source is too light. Please do replace if you find some. ;)

To test CJK search, you could grep some CJK text from the site from those countries - e.g. www.amazon.co.jp or so - and check whether the result contains the same letter as your guinea-pig one :)