Affects Version/s: 6.1.14
Fix Version/s: 6.1.27
Number of attachments :
I've attached Surrogates.java which demonstrates the problem.
pw = HttpConnection.printWriter("UTF-8");
String a = new String("<?xml version=\"1.0\" ?><root>\uDBB8\uDF30</root>");
Both the low and high surrogate characters are encoded as utf-8. They need to be combined per utf-8 spec.
A: Surrogates are code points from two special ranges of Unicode values, reserved for use as the leading, and trailing values of paired code units in UTF-16. Leading, also called high, surrogates are from D80016 to DBFF16, and trailing, or low, surrogates are from DC0016 to DFFF16. They are called surrogates, since they do not represent characters directly, but only as a pair.
I've also attached a AbstractGenerator.java with a working fix. But you guys might want to refactor. I didn't see a fix in subsequent versions of Jetty.