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

SJIS 0x8160 is not mapped correctly.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2
    • Resolution: Duplicate
    • 1.1.6
    • None
    • core-libs

    Description



      Name: diC59631 Date: 04/20/98


      Japanese SJIS 0x8160 is not mapped correctly. I notice in BugID#
      4113837 SJIS 0x8160, i.e. JIS 0x2141, may be mapped to UniCode
      \uFF5E. At the moment, the code is mapped to \u301C in JDK1.1.6M.
      The FULL-WIDTH TILDE is not displayed correctly in List, TextField,
      and the title bar. Also, when SJIS 0x8160 is input to Button,
      System.out.println() in its ActionListener displays '?' to
      the given code.
       
      The following two code demonstrates the problem.
      karaBug.java is in SJIS code and uuencoded. karaBug2.java is
      its UniCode expression converted by native2ascii.
       
      begin 664 karaBug.java
      M:6UP;W)T(&IA=F$N87=T+BH[#0II;7!O<G0@:F%V82YA=W0N979E;G0N*CL-
      M"@T*<'5B;&EC(&-L87-S(&MA<F%"=6<@97AT96YD<R!&<F%M92![#0H)5&5X
      M=$9I96QD(&EN<'5T7W1F.PT*#0H)<'5B;&EC('-T871I8R!V;VED(&UA:6XH
      M4W1R:6YG(&%R9W9;72D@>PT*"0EK87)A0G5G('=I;B ](&YE=R!K87)A0G5G
      M*"*!8)6VCIJ57(ZF@LR/X8I1(BD[#0H)"7=I;BYS9713:7IE*#$X,"PQ.# I
      M.PT*"0EW:6XN<V5T5FES:6)L92AT<G5E*3L-"@E]#0H-"@EK87)A0G5G*%-T
      M<FEN9R!T:71L92D@>PT*"0ES=7!E<BAT:71L92D[#0H)"5!A;F5L(' @/2!N
      M97<@4&%N96PH*3L-"@D)4W1R:6YG(&MA<F$@/2 B@6"!8(%@(CL-"@D)3&ES
      M="!L:7-T(#T@;F5W($QI<W0H,RD[#0H)"6QI<W0N861D*&MA<F$I.PT*"0EL
      M:7-T+F%D9"@B@:J!JH&JD+./[8+%@LB"HB(I.PT*"0E497AT1FEE;&0@=&8@
      M/2!N97<@5&5X=$9I96QD*&MA<F$@*R(@@:F0LX_M@L6"R(*B(" @(BD[#0H)
      M"7 N861D*&QI<W0I.PT*"0EP+F%D9"AT9BD[#0H-"@D):6YP=71?=&8@/2!N
      M97<@5&5X=$9I96QD*#4I.PT*"0E"=71T;VX@8G1N(#T@;F5W($)U='1O;B@B
      MD_R7S8R+B<J"S)5<CJ8B*3L-"@D)8G1N+F%D9$%C=&EO;DQI<W1E;F5R*&YE
      M=R!297-U;'1,:7-T96YE<B@I*3L-"@D)<"YA9&0H:6YP=71?=&8I.PT*"0EP
      M+F%D9"AB=&XI.PT*#0H)"6%D9"@B0V5N=&5R(BQP*3L-"@E]#0H-"@EC;&%S
      M<R!297-U;'1,:7-T96YE<B!I;7!L96UE;G1S($%C=&EO;DQI<W1E;F5R('L-
      M"@D)<'5B;&EC('9O:60@86-T:6]N4&5R9F]R;65D*$%C=&EO;D5V96YT(&4I
      M('L-"@D)"5-T<FEN9R!S='(@/2!I;G!U=%]T9BYG971497AT*"D[#0H)"0E3
      M>7-T96TN;W5T+G!R:6YT;&XH(I/\E\V5MHZ:@LV!05LB*W-T<BLB72(I.PT*
      ,"0E]#0H)?0T*?0T*
       
      end
       
      import java.awt.*;
      import java.awt.event.*;
       
      public class karaBug2 extends Frame {
              TextField input_tf;
       
              public static void main(String argv[]) {
                      karaBug2 win = new karaBug2("\u301c\u6587\u5b57\u8868\u793a\u306e\u969c\u5bb3");
                      win.setSize(180,180);
                      win.setVisible(true);
              }
       
              karaBug2(String title) {
                      super(title);
                      Panel p = new Panel();
                      String kara = "\u301c\u301c\u301c";
                      List list = new List(3);
                      list.add(kara);
                      list.add("\u2191\u2191\u2191\u6b63\u5e38\u3067\u306a\u3044");
                      TextField tf = new TextField(kara +" \u2190\u6b63\u5e38\u3067\u306a\u3044 ");
                      p.add(list);
                      p.add(tf);
       
                      input_tf = new TextField(5);
                      Button btn = new Button("\u5165\u529b\u7d50\u679c\u306e\u8868\u793a");
                      btn.addActionListener(new ResultListener());
                      p.add(input_tf);
                      p.add(btn);
       
                      add("Center",p);
              }
       
              class ResultListener implements ActionListener {
                      public void actionPerformed(ActionEvent e) {
                              String str = input_tf.getText();
                              System.out.println("\u5165\u529b\u6587\u5b57\u306f\u3001["+str+"]");
                      }
              }
      }
      (Review ID: 28541)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              bcbeck Brian Beck (Inactive)
              dindrigo Daniel Indrigo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: