Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
justjayel
Posts: 7
Registered: ‎05-13-2012
My Carrier: Developer

Detect character set

Hi guys,

 

I was wondering is there a way to detect the character set? For example detect whether the characters are Chinese or English?

 

Thanks.

Please use plain text.
Developer
peter_strange
Posts: 17,664
Registered: ‎07-14-2008

Re: Detect character set

I think the answer here is "it depends". 

 

In what circumstances are you wanting to do this? 

Please use plain text.
New Contributor
justjayel
Posts: 7
Registered: ‎05-13-2012
My Carrier: Developer

Re: Detect character set

I just want to know whether characters users has entered are chinese characters or alphanumeric characters
Please use plain text.
Developer
peter_strange
Posts: 17,664
Registered: ‎07-14-2008

Re: Detect character set

I am not aware of a way to check this given a String. 

 

However you might be able to do this by checking each character. 

 

Look at the Character and Characters class.  do the methods in there help?

 

Remember that the characters entered are Unicode, so you might be able to check the values directly too. 

Please use plain text.