Howdy,

>> I have accept input from the user and check if the input is
>> japanese character only,
>> for example : If name is accepted , I need to check if its
>> any of the Hiragana, Katakana or Kanji.
>
>Hmm... why would you like to do that? I've never really seen
>the need for that.

It's actually quite common for forms here in Japan (both online and paper)
where the user is requested to give the phonetic reading in Hiragana or
Katakana for their Kanji name. (Especially the first name where there can
be a lot of latitude on the reading even if the Kanji used has other more
conventional readings. Likewise for some uncommon place names.) Online, it
can also be handy where you want to disallow the use of and catch and
filter numbers or symbols that may also have double-byte equivalents, and
instead use only the Hankaku ASCII forms, though these can usually be
validated more directly by an A - Z, 0 - 9, etc. regular expression.

We currently do this to validate our form inputs on the client side using
Javascript functions before accepting the inputs serverside. When I have
time, I'll look into what's possible with the mb_ereg/mb_regex functions.
Umesh, if you'd like a copy of our Javascript functions, please contact me
offlist.

Hope this helps,
Lew

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

Reply via email to