My favorites | Sign in
Project Logo
                
Code license: Apache License 2.0
Labels: unicode
Show all Featured downloads:
unicodereader.zip
Feeds:
People details
Project owners:
  kenu.heo

To show encoded code string to decoded character string.

	public void testReadUnicode() {
		String string = "김갑돌";
		String c2 = StringHelper.readUnicode(string);
		assertEquals("김갑돌", c2);
	}

	public void testReadUnicode2() {
		String string = "김갑 돌";
		String c2 = StringHelper.readUnicode(string);
		assertEquals("김갑 돌", c2);
	}

	public void testReadUnicode3() {
		String string = "abc";
		String c2 = StringHelper.readUnicode(string);
		assertEquals("abc", c2);
	}

	public void testReadNull() {
		String string = null;
		String c2 = StringHelper.readUnicode(string);
		assertEquals(null, c2);
	}

	public void testSplit() {
		String[] strings = "김갑돌".split("&#");
		assertEquals(4, strings.length);
		assertEquals("", strings[0]);
		assertEquals("44608;", strings[1]);
	}

	public void testCode() {
		String unicode = "가나다라마";
		assertEquals("가나다라마", StringHelper.readUnicode(unicode));
	}

	public void testCodeMixed() {
		String unicode = "가나가나다라마";
		assertEquals("가나가나다라마", StringHelper.readUnicode(unicode));
	}








Hosted by Google Code