Greetings,
I am developing GWT application where user can enter his details in Japanese. But the \'userid\' and \'password\' should only contain English characters(L
I successfully used a combination of the answers of user232624, Joachim Sauer and Tvaroh:
static CharsetEncoder asciiEncoder = Charset.forName("US-ASCII"); // or "ISO-8859-1" for ISO Latin 1 boolean isValid(String input) { return Character.isLetter(ch) && asciiEncoder.canEncode(username); }