Check chines caracter

M

Marcos

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
 
M

Martin Honnen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top