By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.

Check chines caracter

P: n/a
Hello,

I want to check the caracters of one input box and validate if are in
chines or not.

Somebody help me?

Thank' s

Marcos

--
Usando o M2, revolucion√°rio cliente de e-mail do Opera:
http://www.opera.com/m2/
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Marcos wrote:

I want to check the caracters of one input box and validate if are in
chines or not.


JavaScript string processing is Unicode based (at least in browsers
since IE4 and Netscape 4.06) thus you need to look at the Unicode
specification to check which code points the chinese characters have and
then check whether the characters in input.value are in that range, for
instance with a regular expression.
Depending on the encoding of your HTML/script you might need to use
escape sequences alike
'\uDDDD'
to represent a character with Unicode code point DDDD.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.