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.