to do further convertNonASCIIString().
The attachement is the patch that works in my enviroment.
On 1/2/06,
SourceForge.net <[EMAIL PROTECTED]> wrote:
Bugs item #1290803, was opened at 2005-09-14 01:46
Message generated for change (Comment added) made by jonathanlocke
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1290803&group_id=119783
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
>Group: 1.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Martijn Dashorst (dashorst)
>Assigned to: Jonathan Locke (jonathanlocke)
Summary: StringsTest fails on linux/unix?
Initial Comment:
Ryan Sonnek said:
Is anyone developing on unix or linux? I just got this
compile
exception from the latest CVS code.
StringsTest.java :193: warning: unmappable character for
encoding UTF8
convertNonASCIIString("����������"),
The unit tests are also failing for this class because
of this
problem. Couldn't the charactyers be encoded with
standard unicode
(ex: \uA040) instead of using the actual glyphs?
----------------------------------------------------------------------
>Comment By: Jonathan Locke (jonathanlocke)
Date: 2006-01-01 16:21
Message:
Logged In: YES
user_id=486414
I've checked in this change. Please re-open this bug if it
is not fixed.
----------------------------------------------------------------------
Comment By: Ingram Chen (ingramchen)
Date: 2005-11-16 19:38
Message:
Logged In: YES
user_id=1336789
oops !
"\n \té" should convert to "\n \t\u00e9"
----------------------------------------------------------------------
Comment By: Ingram Chen (ingramchen)
Date: 2005-11-16 19:36
Message:
Logged In: YES
user_id=1336789
I convert test string to unicode escape, and test fine in
linux.
"Çüéâäàåçêë" convert to
"\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb"
"\n \té" convert to "\n \té"
ps. a page can help convert unicode escape:
http://www.hot-tips.co.uk/useful/unicode_converter.HTML
(I can not upload patch file...)
----------------------------------------------------------------------
Comment By: Eelco Hillenius (eelco12)
Date: 2005-10-02 03:21
Message:
Logged In: YES
user_id=820266
Could someone with a Linux box confirm this and send in a
patch please?
----------------------------------------------------------------------
Comment By: Martijn Dashorst (dashorst)
Date: 2005-09-25 07:41
Message:
Logged In: YES
user_id=695103
I'm unable to confirm this on Mac OSX. The tests run as expected here.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1290803&group_id=119783
--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen
Index: StringsTest.java
===================================================================
RCS file: /cvsroot/wicket/wicket/src/test/wicket/util/string/StringsTest.java,v
retrieving revision 1.10
diff -u -r1.10 StringsTest.java
--- StringsTest.java 2 Jan 2006 00:21:51 -0000 1.10
+++ StringsTest.java 3 Jan 2006 16:10:37 -0000
@@ -170,8 +170,9 @@
assertNull(Strings.escapeMarkup(null, true, true));
assertEquals("", Strings.escapeMarkup("", true, true));
+ //the escaped unicode is Çüéâäàåçêë"
assertEquals("Çüéâäàåçêë",
Strings
-
.escapeMarkup(convertNonASCIIString("Çüéâäàåçêë"), false, true));
+
.escapeMarkup("\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb",
false, true));
assertEquals("\n \té",
Strings.escapeMarkup(convertNonASCIIString("\n \té"), false,
true));
@@ -190,7 +191,7 @@
assertEquals("abcdefghijklm?",
Strings.replaceHtmlEscapeNumber("abcdefghijklm?"));
assertEquals("a &#", Strings.replaceHtmlEscapeNumber("a &#"));
assertEquals(
-
convertNonASCIIString("\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb"),
+
"\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb",
Strings
.replaceHtmlEscapeNumber("Çüéâäàåçêë"));
}
