MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » September 2009

Re: Detect katakana characters in java?



fixed


Hi David,

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


Source: http://unicode.org/charts/

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

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"
<java400-l@xxxxxxxxxxxx>
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)?

Thanks!

david








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact