Пример #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));
 }