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

Chinese can't displayed correctly in Swing components when encoding is zh_CN.EUC

XMLWordPrintable

      hercule.li@prc 2000-07-11

      In all Swing components, Simplified Chinese can't be displayed correctly.
      This phenomenon ONLY appears in solaris 2.6.
      But it works on 2.7 and 2.8. In AWT components , the display
      is OK in 2.6 ,2.7 and 2.8 .

      java version "1.4.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b22)
      Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, interpreted mode)


      There are two ways to reproduce this bug.

      1. running attached file Buttons.java
      2. running JDKTester , choose Swing.

      By the way, the attached file carnation.patch is all patches
      installed in the test machine carnation
       SunOS carnation.prc.sun.com 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-5_10


      ---------- end of hercule.li@prc 2000-07-11


      Reproducible in
      Build: merlin b23
      Platform: Solaris 8
      Encoding: zh and zh.GBK
      Tool: JDKTester, chose Swing.

      Note: a Null Pointer exception was thrown.

      i18n-sol8:/home/bpaga/i18n-TDC/NJDKTest_ws/build 9 % runit

      JDK I18n/L10n Test Suite 1.0 Copyright (c) 1997 TDC - Sun Microsystems, Inc.
       ÕýÔÚ³õʼ»¯....×°Ôع¤¾ß......Íê±Ï!
      java.lang.NullPointerException
              at javax.swing.SizeRequirements.calculateAlignedPositions(SizeRequirements.java:329)
              at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:313)
              at java.awt.Container.layout(Container.java:702)
              at java.awt.Container.doLayout(Container.java:692)
              at java.awt.Container.validateTree(Container.java:766)
              at java.awt.Container.validate(Container.java:744)
              at tools.swingtester.JComboBoxesPanel.setTestContent(JComboBoxesPanel.java:78)
              at tools.swingtester.SwingTesterFrame.setTestContent(SwingTesterFrame.java:339)
              at tools.swingtester.SwingTesterFrame.configure(SwingTesterFrame.java:292)
              at tools.swingtester.SwingTester.configure(SwingTester.java:127)
              at tools.swingtester.SwingTester.doTest(SwingTester.java:321)
              at tools.swingtester.SwingTester.autotest(SwingTester.java:183)
              at tools.utility.TestDriver.run(TestDriver.java:206)
              at java.lang.Thread.run(Thread.java:488)
      Exception occurred during event dispatching:


      ---------ben.pagatpatan@Eng 2000-07-17


      hercule.li@prc 2000-07-21

      The description in hercule.li@prc 2000-07-11 is NOT right .

      In fact, this bug is caused by encoding,

      if encoding is zh_CN.EUC, even in solaris 7 or 8, this bug exists.
      if encoding is zh_CN.GBK, this bug doesn't exist.

      Sorry for my carelessness.

      --------- end of hercule.li@prc 2000-07-21

            sherman Xueming Shen
            hlisunw Hercule Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: