Cactus
  1. Cactus
  2. CACTUS-29

The redirector can not send the double byte characters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.5-beta1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Windows NT/2K
      Platform: PC

      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)

      { super (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); }

      }

        Activity

          People

          • Assignee:
            Vincent Massol
            Reporter:
            ahasegawa
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development