aMule Bug Tracker - aMule
View Issue Details
0000903aMuleSearchpublic2006-05-28 19:572007-05-09 17:47
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

2006-05-30 07:19   
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
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)), ...
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
2007-05-09 16:02   
Thanks for it, I'll touch it later.
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. or so - and check whether the result contains the same letter as your guinea-pig one :)