コード例 #1
0
 @Test
 public void testNonASCII() {
   Assert.assertFalse(CharsetUtil.isASCII(SWISS_GERMAN_HELLO));
   Assert.assertFalse(CharsetUtil.isASCII(RUSSIAN_HELLO));
 }
コード例 #2
0
 @Test
 public void testAllASCII() {
   String s = "Like hello and stuff";
   Assert.assertTrue(CharsetUtil.isASCII(s));
 }