On Fri, 28 Feb 2003 12:28:18 +0100
"Simon Dedeyne" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> Is there a way/function for detecting if a word is in katakana or
> hiragana?
> I'm using UTF-8 encoding. 
> 
> I don't know if it's of any help, but I wonder if a solution could be
> find through a regular expression option, like indicated (though not
> explained) here http://regex.info/indexlist.html
> 
> Tnx,
> Simon

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