You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-dev@jakarta.apache.org by Sanjay Chopra <sa...@sapient.com> on 2002/01/16 14:36:25 UTC

detecting UTF-8 characters in Strings

I am trying to write a validation function that would allow me to detect any
UTF-8 characters

Just to give the context -- its a user driven program and we would like to
detect when the user has entered any UTF-8 character Vs. only ASCII
characters.

An expression something like this : "[a-zA-Z][\\w\\-]{2,31}"  would allow to
enter the ascii characters

Is there a way by way of expressions that I can detect if the user is
entering UTF-8 characters ... \u or \x something of that sorts...

any help would be greatly appreciated..

many thanks
-sanjay