PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Submissions (http://www.phpdig.net/forum/forumdisplay.php?f=24)
-   -   Small fix for Japanese indexing (http://www.phpdig.net/forum/showthread.php?t=1808)

Edomondo 02-04-2005 04:12 AM

Small fix for Japanese indexing
 
Hi there.

UTF-8 compatible PhpDig is a great tool! Thank you Charter and all contributors!

Because of half-width (Hankaku) and full-width (Zenkaku) characters in Japanese, the following search won't return the same results depending on the characters used in the original page :
"999" and "999" (Half-width <> Full-Width)
"Test" and "Test" (Half-width <> Full-Width)
"アイウエオ" and "アイウエオ" (Full-width <> Half-Width)
(Sorry for those who can't read asian characters)

May I suggest to add in robot_functions.php on line 188 the following line?

PHP Code:

$text mb_convert_kana($textKVa"UTF-8"); 

This way, all alphanumeric full-width characters will be changed in their half-width counterparts and all half-width katakana will turn into full-width katakana.

I recommend to add this line in the future releases of PHPdig.

Charter 02-05-2005 12:40 AM

Thanks, I posted instructions for alternative changes that you may find useful in this post. In order to be able to enter either half-width or full-width characters for searches, you should also make the changes to the seach_functions.php file, instructions for which are given in the aforementioned post.


All times are GMT -8. The time now is 06:22 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.