I haven't tried the mb_ereg solution yet, but I thought of doing something with 
mb_convert_kana()
Here's a little example script. I try it, but nothing gets converted at all! (I have 
mb functions
Enabled and am using PHP 4.3.0 on a Window XP system). Why doesn’t this work?

Simon

<html>
<head>
<meta http-equiv="Content-Type" content="Text/Html; Charset=UTF-8">
<title>hira2kata</title>
</head>
<body>
<?php
$str="わたしわ";
// watashi 
echo $str."<br>";
$str = mb_convert_kana($str, "c");
echo $str."<br>"; 
$str = mb_convert_kana($str, "C");
echo $str; 
?>
</body>
</html>




You can accomplish it by converting any hiragana / katakana mixture to either hiragana 
or katakana characters with mb_convert_kana() and then comparing it with the original.

Also try mb_ereg_* functions that allows localised characters to be used in character 
classes.

Moriyoshi


--
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to