• 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

Identifying Japanese Character.

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can we Identify if the String has Japanse Characters. One way can be picking Charcater by Character and Identifying if thet Lie between 30A0-30FF and 3040-309F. but this is Crude. Is there any facility available with Java to do this?
Cheers
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there were such a facility, it would have to examine each character anyway. However I do not know of one, so you would probably be best to do it this way yourself.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could do something like this:

You'll have to look at the API for Character.UnicodeBlock to make a more complete list of blocks. And many of the chars you need are in various CJK blocks (Chinese/Japanese/Korean unified) which means that they may contain some chars that aren't really appropriate to Japanese-only usage. I think. This is a muddy issue which I don't understand much. I think you'll need to test using a lot of data, and consulting with people who know the language well (assuming you do not) to be sure your list of chars is appropriate.
 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jim,
This was exactly what i wanted to do.

Cheers
Gaurav
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This was exactly what i wanted to do.
Wel, make sure you've gone through the whole list of "CJK" blocks before you say that. I have no idea what they all do, but if they say CJK they probably have something to do with Japanese...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic