• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Identify Unicode chars in string

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I am reading data from an CSV file and this CSV can contains special chars (like "Mich�le") aswell in some records.

I am getting all hte records in csv file in an array of Strings.
Can any one tell me how can I identify a string inside this array is of Unicode/special chars. any method in Java to identify this??
thanks & regards,
Mahesh
 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I believe all characters in Java are already Unicode, what you seem to be looking for is if the character belongs to a particular subset of Unicode, not just to the ASCII Subdomain.

Maybe the java.lang.Character.UnicodeBlock class may be useful to your purpose. It has method that given a char can tell you what its UnicodeBlock is, or you could simply test what is the number or the code point of the unicode char and see if it is out of the scope of the ASCII characters.

The class Character also offers some interesting methods. Take a look at it.


[ October 25, 2006: Message edited by: Edwin Dalorzo ]
 
Mahesh Pinnamaneni
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Edwin,
Thanks for your reply. it worked for me..
regards,
Mahesh P
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic