From 99d8f87d3d9ed280c2a4dbe8658e93d25360b715 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 6 Jan 2010 22:11:53 +0000 Subject: [PATCH] no utf8 in source git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1184 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../src/test/java/org/eclipse/jetty/util/URLEncodedTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java index c41e8262417..43d7a5d9f1d 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/URLEncodedTest.java @@ -193,6 +193,9 @@ public class URLEncodedTest extends junit.framework.TestCase url_encoded.clear(); url_encoded.decode("text=%E0%B8%9F%E0%B8%AB%E0%B8%81%E0%B8%A7%E0%B8%94%E0%B8%B2%E0%B9%88%E0%B8%81%E0%B8%9F%E0%B8%A7%E0%B8%AB%E0%B8%AA%E0%B8%94%E0%B8%B2%E0%B9%88%E0%B8%AB%E0%B8%9F%E0%B8%81%E0%B8%A7%E0%B8%94%E0%B8%AA%E0%B8%B2%E0%B8%9F%E0%B8%81%E0%B8%AB%E0%B8%A3%E0%B8%94%E0%B9%89%E0%B8%9F%E0%B8%AB%E0%B8%99%E0%B8%81%E0%B8%A3%E0%B8%94%E0%B8%B5&Action=Submit"); - assertEquals("ฟหกวดา่กฟวหสดา่หฟกวดสาฟกหรด้ฟหนกรดี",url_encoded.get("text")); + + String hex ="E0B89FE0B8ABE0B881E0B8A7E0B894E0B8B2E0B988E0B881E0B89FE0B8A7E0B8ABE0B8AAE0B894E0B8B2E0B988E0B8ABE0B89FE0B881E0B8A7E0B894E0B8AAE0B8B2E0B89FE0B881E0B8ABE0B8A3E0B894E0B989E0B89FE0B8ABE0B899E0B881E0B8A3E0B894E0B8B5"; + String expected = new String(TypeUtil.fromHexString(hex),"utf-8"); + assertEquals(expected,url_encoded.get("text")); } }