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

JDK8 and JavaFX8 unsupport Chinese!

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • None
    • client-libs

      FULL PRODUCT VERSION :
      java version " 1.8.0-ea "
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b97)
      Java HotSpot(TM) Client VM (build 25.0-b39, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      OS Name:Windows 7
      OS Version:6.1.7600

      A DESCRIPTION OF THE PROBLEM :
      I create a javafx project and the control set text use Chinese like this:
      Button btn = new Button( " ?? " );
      run the project and the text of the button disappeared.
      But,display normal when I set text of the button use English.

      REGRESSION. Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.install JDK8 Early Access Releases B96.
      2.install JDK7u25.
      3.unstall JDK8 Early Access Releases B96.
      4.install JDK8 Early Access Releases B97.
      5.create a javafx project and create a javafx application use netbeans or e(fx)clise.
      6. modify the code below btn.setText( " Say 'Hello World' " ) to btn.setText( " ?? " ),or set the text of the button to any Chinese character.
         public void start(Stage primaryStage) {
              Button btn = new Button();
              btn.setText( " Say 'Hello World' " );
              btn.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent event) {
                      System.out.println( " Hello World! " );
                  }
              });
              
              StackPane root = new StackPane();
              root.getChildren().add(btn);
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle( " Hello World! " );
              primaryStage.setScene(scene);
              primaryStage.show();
          }
      7.compile and run the project.
      8.you will find the text of the button is a blank,or the chinese character displayed Incorrectly.
      Explanation:
      1. I use the Netbeans IDE 7.3.1 and download from https://netbeans.org/downloads/start.html?platform=windows&lang=zh_CN&option=all
       2. my OS is chinese version

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the chinese character display the correct

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       * To change this template, choose Tools | Templates
       * and open the template in the editor.
       */
      package javafx8testchinese;

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      /**
       *
       * @author rql1986
       */
      public class NewFXMain extends Application {
          
          @Override
          public void start(Stage primaryStage) {
              Button btn = new Button();
              btn.setText( " ???? " );
              btn.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent event) {
                      System.out.println( " Hello World! " );
                  }
              });
              
              StackPane root = new StackPane();
              root.getChildren().add(btn);
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle( " Hello World! " );
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          /**
           * The main() method is ignored in correctly deployed JavaFX application.
           * main() serves only as fallback in case the application can not be
           * launched through deployment artifacts, e.g., in IDEs with limited FX
           * support. NetBeans ignores main().
           *
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              launch(args);
          }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      no method

      SUPPORT :
      YES

            fheidric Felipe Heidrich (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: