JDK-8199840 : [macOS] Text containing accents is corrupted in Alerts, Text, or TextFlows when wrapping is enabled
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u161
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2018-03-19
  • Updated: 2018-03-21
  • Resolved: 2018-03-20
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
macOS 10.13.3

A DESCRIPTION OF THE PROBLEM :
When displaying text that contains accented characters, where the accents are combining characters, the text gets corrupted when wrapped.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text wraps on word boundaries
ACTUAL -
The text gets corrupted

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.stage.Stage;

public class Test extends Application
{
    public static void main(
        String[] args)
    {
        launch(args);
    }

    @Override
    public void start(
        Stage primaryStage) throws Exception
    {
        final Alert alert = new Alert(AlertType.CONFIRMATION);
        alert.getDialogPane().setContentText("this is a long path ��/it has combining characters ����/and it has some more to make it wrap ����/");
        alert.showAndWait();
    }
}
---------- END SOURCE ----------


Comments
PFA screenshot of reproduced issue in 8u161, provided by Submitter - Screen Shot _BySubmitter_Issue.png I was not able to reproduce the issue on macOS but Submitter confirmed that this issue is not reproducible in 8u162, 8u172, 11-ea+5. Closing this as duplicate of JDK-8130721
20-03-2018

Could not find issue in macOS but in Windows 10. macOS 10.13.3 ------------------------- When ran the test case in 8u161, 9.0.4, 10+43, 11-ea+5, behavior is same in all JDK's, text is wrapped - PFA screenshot AccentTest_macOS_8u161.png Windows 10 ----------------- When ran the test case with JDK 8u161, 8u172, text is wrapped but characters are different - PFA screenshot AccentTest_Windows10_8u161.png When ran the test case with JDK 9.0.4, 10+43, 11-ea+3, text is trucated with ellipsis. - PFA screenshot AccentTest_Windows10_9.0.4.png
20-03-2018