I'm finishing up on a project that has a production system half on the
AS/400 and half on SQL Server, so I don't have time to be definitive. But
offhand, assuming you have no other clues, if you can get it to Unicode, the
Japanese sets and hex/Unicode ranges are:
Hiragana 3040 - 309F
Katakana 30A0 - 30FF
Katakana Phonetic Ext. 31F0 - 31FF
Halfwidth Katakana FF00 - FFEF
It would be slow, but you could check if you hit a character in those
ranges. You'd need to validate what the JDBC driver does when converting
from presumably EBCDIC to Unicode to be sure your comparisons are valid.
BTW, Everybody knows that UTF-8 is now supported, so there's no space
penalty anymore for using Unicode from the get go, right?. Unfortunately,
there are other issues if non-Unicode tables are used in the same project.
HTH, and please let us know the result.
Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400
----- Original Message -----
From: "David Gibbs" <david@xxxxxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400"
Sent: Wednesday, September 30, 2009 12:38 PM
Subject: Detect katakana characters in java?
OK, this is not specifically i related, but I'm encountering this trying
to talk to the i.
How do you check a String to see if it contains Japanese characters
(double or single byte)?