Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

How can you parse non-ascii text in Javascript?

Hi,
How can you parse non-ascii text in Javascript? If I want to parse Chinese characters in Javascript using regular expression. Is this possible?

Thanks
Jamie
0
jamie_lynn
Asked:
jamie_lynn
  • 3
1 Solution
 
b0lsc0ttIT ManagerCommented:
Yes, it is possible.  The regex engine Javascript uses will support this.  The most common method is to have the expression use a unicode value.  In regular expressions this is done with ...

\uNNNN (where NNNN is the four digit unicode value)

Let me know if you have a question or need more info on this.

bol
0
 
b0lsc0ttIT ManagerCommented:
There is some good info on using unicode in an expression at http://www.regular-expressions.info/unicode.html.

I can provide more info or answer questions about this if needed.

bol
0
 
b0lsc0ttIT ManagerCommented:
I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now