Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4347389

Japanese Parameter Values not loaded correctly in Java Plugin and Netscape

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.3.0
    • deploy
    • x86
    • windows_nt



      Name: md23716 Date: 06/22/2000

      1. Known existing SUN Bug ID's (If Any): None

      2. Workarounds: None

      3. Test Case and Failure Data

      When an applet is running on Java Plug-in with Netscape Navigator, Japanese parameter
      values described in html file are not loaded correctly. The loaded Japanese parameters are
      shown as garbages. This problem does not occur with IE5 and appletviewer.

      - Environment
      Operating Systems: Windows 95, Windows 98, Windows NT 4.0, Windows 2000
      Hardware: Pentium II 600MHz, 256MB RAM, 17GB harddrive
      Application: Netscape Communicator 4.7[ja]

      - Steps to reproduce the problem
      1) Create the following Java source as "ParamTest.java", and compile the source.
      --- start ---
      import java.awt.*;
      import java.applet.*;
      public class ParamTest extends Applet {
      public void init() {
      String str = getParameter("JSTRING");
      setLayout(new FlowLayout());
      add(new Label(str));
      add(new Button(str));
      System.out.println(str);
      }
      }
      --- end ---

      2) Create the following html file as "paramtest.html".
      This file contains Japanese string as param of "JSTRING".
      --- start ---
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html>
      <body>
      <!-- CONVERTER VERSION 1.3 -->
      <OBJECT
      classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      WIDTH = 300
      HEIGHT = 100
      codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
      <PARAM NAME = CODE VALUE = ParamTest >
      <PARAM NAME = CODEBASE VALUE = "." >
      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
      <PARAM NAME="JSTRINTG" VALUE="?????">
      <COMMENT>
      <EMBED
      type="application/x-java-applet;version=1.3"
      CODE = ParamTest
      CODEBASE = "."
      WIDTH = 300
      HEIGHT = 100
      jstring=?????
      pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
      <NOEMBED>
      </COMMENT>
      </NOEMBED>
      </EMBED>
      </OBJECT>
      <!--"END_CONVERTED_APPLET"-->
      </body>
      </html>
      --- end ---

      3) Open paramtest.html from Netscape Navigator.
      A test applets of AWT will come up, but strings in Label and Button in the applet
      will be shown as garbages. <----- PROBLEM !!
      These labels are Japanese originally and passed to the applets via a value of a PARAM tag in the HTML file.
      (note) The Japanese strings used in this sample are "\u3042\u3042\u3042\u3042".


      4. Targeted FCS Release
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
      public class ParamTest extends Applet {
      public void init() {
      String str = getParameter("JSTRING");
      setLayout(new FlowLayout());
      add(new Label(str));
      add(new Button(str));
      System.out.println(str);
      }
      }
      --- end ---

      2) Create the following html file as "paramtest.html".
      This file contains Japanese string as param of "JSTRING".
      --- start ---
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html>
      <body>
      <!-- CONVERTER VERSION 1.3 -->
      <OBJECT
      classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      WIDTH = 300
      HEIGHT = 100
      codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
      <PARAM NAME = CODE VALUE = ParamTest >
      <PARAM NAME = CODEBASE VALUE = "." >
      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
      <PARAM NAME="JSTRINTG" VALUE="?????">
      <COMMENT>
      <EMBED
      type="application/x-java-applet;version=1.3"
      CODE = ParamTest
      CODEBASE = "."
      WIDTH = 300
      HEIGHT = 100
      jstring=?????
      pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
      <NOEMBED>
      </COMMENT>
      </NOEMBED>
      </EMBED>
      </OBJECT>
      <!--"END_CONVERTED_APPLET"-->
      </body>
      </html>
      --- end ---

      3) Open paramtest.html from Netscape Navigator.
      A test applets of AWT will come up, but strings in Label and Button in the applet
      will be shown as garbages. <----- PROBLEM !!
      These labels are Japanese originally and passed to the applets via a value of a PARAM tag in the HTML file.
      (note) The Japanese strings used in this sample are "\u3042\u3042\u3042\u3042".


      4. Targeted FCS Release
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)



      ======================================================================

            stanleyh Stanley Ho (Inactive)
            mdevereuorcl Michelle Devereux (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: