Details
Description
Could you please use same encoding to get result from the server through servlet
output stream? When I run the following test case with Cactus, the international
characters are corrupted to '?'. Since, the server side is using 'ISO-8859-1'
encoding to send the result and the client side is using platform default
encoding to get the result from server, then the ISO-8859-1 encoding can not
send the double byte characters without corruption.
Steps to Reproduce:
Run the following test case with Cactus.
Actual Results:
> junit.framework.ComparisonFailure: expected:<aaa> but was:<???>
Expected Results:
> The '???' part shows 3 different double byte characters.
package report;
import javax.servlet.ServletException;
import org.apache.cactus.ServletTestCase;
public class TestServlet2 extends ServletTestCase {
public TestServlet2(String name)
public void testDoGet() throws ServletException
{ String hiragana1 = "\u305d"; // Hiragana So String katakana1 = "\u30bd"; // Katakana So String cjk1 = "\u8868"; // Kanji Hyou String actualTest = hiragana1 + katakana1 + cjk1; assertEquals("aaa", actualTest); }}