View Single Post
Old 01-08-2004, 06:51 AM   #8
Edomondo
Orange Mole
 
Edomondo's Avatar
 
Join Date: Jan 2004
Location: In outer space
Posts: 37
I did some testing.
Jcode works great to convert from a Japanese encodings to another one. it is definitely what I was looking for!

strtok() can use multiple separator pattern made of more than 1 character.

But:

PHP Code:
<?php
$string 
"This/*is/*an/*example/*string";
$separator "/*";
/* Use tab and newline as tokenizing characters as well  */
$tok strtok($string$separator);
while (
$tok) {
   echo 
"Word=$tok<br />";
   
$tok strtok($separator);
}
?>
Must be replaced by:

PHP Code:
<?php
$string 
"This/*is/*an/*example/*string";
$separator "/*";

$tok strtok($string$separator);
while (
$tok !== FALSE)
{
  
$toks[] = $tok;
  
$tok strtok($separator);
}

while (list(
$k,$v) = each($toks))
{
  echo 
"Word=$v<br />";
}
?>
So, it might be possible to use multi-byte characters to separate words. Am I right?

Now I'm going to need help configuring correctly $phpdig_words_chars and $phpdig_string_subst.

Last edited by Edomondo; 01-08-2004 at 06:56 AM.
Edomondo is offline   Reply With Quote