Uploaded image for project: 'Cactus'
  1. Cactus
  2. CACTUS-29

The redirector can not send the double byte characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.5-beta1
    • Framework
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 13628

    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); }

      }

      Attachments

        Activity

          People

            vmassol Vincent Massol
            ahasegawa@borland.com ahasegawa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: