View Single Post
Old 01-08-2004, 03:39 PM   #12
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. I haven't done any benchmarks so I'm not sure, but for a lot of processing the following might be faster:
PHP Code:
$separator " ";
$string "This/*is/*an/*example/*0/*string.";
$string str_replace("/*"," ",$string);
$tok strtok($string$separator);
while (
$tok !== FALSE) {
   echo 
"Word=$tok<br />";
   
$tok strtok($separator);

As for the $phpdig_string_subst and $phpdig_words_chars variables, $phpdig_string_subst['EUC-JP'] = 'Q:Q,q:q'; and $phpdig_words_chars['EUC-JP'] = '[:alnum:]ÆÄÃ*l‹CÃŒ_é–Ÿ‰æÅ...';

This seems backwards when reading the instructions in the config.php file, but with encodings that don't have Latin counterparts, it's the way I figured to make PhpDig version 1.6.5 work with other languages.

Is you MySQL charset ujis? You can find some MySQL charsets and their descriptions here.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote