Learn Japanese with JapanesePod101.com

View topic - Search Weirdness

Search Weirdness

Spotted any errors or found anything that doesn't work?

Search Weirdness

Postby paul_b » Mon 07.17.2006 4:21 pm

Some search strings "return" results that don't actually include any results.

In other words when I searched for NをVーたい it returned

Search Results
1 Forum Post found matching search criteria:


but there were no search results shown below.
Last edited by paul_b on Mon 07.17.2006 4:23 pm, edited 1 time in total.
User avatar
paul_b
 
Posts: 3210
Joined: Thu 06.01.2006 9:35 am

RE: Search Weirdness

Postby zengargoyle » Mon 07.17.2006 5:42 pm

realize this, PHP-Fusion is a horrid piece of work. evil, yucky, bad, scary, poorly coded by clueless kiddies. plus, it has no support of any kind for using multi-byte encodings, especially SJIS which is the most horrid of all multi-byte encodings (way to go Microsoft). i've made lots of little patches here and there to get some stuff to work correctly, but there are infinity-1 other little bugs waiting to rear their ugly heads...

your search string NをVーたい maps to the bytes 82 6d 82 f0 82 75 81 5b 82 bd 82 a2
5b is the ASCII character '[' which is a special character in Regular Expressions, when Fusion searches the DB, it finds some posts, when it goes to count the number of occurences of the search string it forgets to escape the search string for special characters and all of the regex match counts fail and therefore nothing gets displayed.

1) they should escape the search string before trying to match it.
2) they probably shouldn't be using the regular expression matches and should be using straight string matches instead.
3) they do this in numerous places in the code.
4) Fusion is evil.
5) just search for NをV and you'll probably find what you were looking for.
6) i really, really hate Fusion with a passion that grows every time i look at the code.
User avatar
zengargoyle
 
Posts: 1200
Joined: Sun 05.29.2005 10:16 pm


Return to Problems

Who is online

Users browsing this forum: No registered users and 2 guests