Код: Выделить всё
String text =
new StringBuilder ( )
.appendCodePoint ( 65_536 ) // 𐀀 = 65536 = LINEAR B SYLLABLE B008 A
.append ( "\n" )
.appendCodePoint ( 129_318 ) // 129_318 = 🤦 = FACE PALM
.append ( "\n" )
.append ( "🤦♂️" ) // man facepalming = 🤦♂️ = [129318, 8205, 9794, 65039]
.append ( "\n" )
.append ( "« fin »" )
.toString ( );
Код: Выделить всё
𐀀
🤦
🤦♂️
« fin »
Выполнение Java 23.0.1 с OpenJFX 23.0.1, на IntelliJ IDEA 2024.3 EAP, на macOS Sonoma 14.7 (издание для США) ).
Код JavaFX для этого минимального примера приложения:
Код: Выделить всё
package work.basil.example.exunicodeglyph;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import java.io.IOException;
public class HelloApplication extends Application
{
@Override
public void start ( Stage stage ) throws IOException
{
Scene scene = this.makeScene ( );
stage.setTitle ( "Hello!" );
stage.setScene ( scene );
stage.show ( );
}
private Scene makeScene ( )
{
// Widgets
TextArea textArea = new TextArea ( );
String text =
new StringBuilder ( )
.appendCodePoint ( 65_536 ) // 𐀀 = 65536 = LINEAR B SYLLABLE B008 A
.append ( "\n" )
.appendCodePoint ( 129_318 ) // 129_318 = 🤦 = FACE PALM
.append ( "\n" )
.append ( "🤦♂️" ) // man facepalming = 🤦♂️ = [129318, 8205, 9794, 65039]
.append ( "\n" )
.append ( "« fin »" )
.toString ( );
System.out.println ( text );
textArea.textProperty ( ).set ( text );
// Arrange
StackPane root = new StackPane ( );
root.getChildren ( ).add ( textArea );
return new Scene ( root , 320 , 240 );
}
public static void main ( String[] args )
{
HelloApplication.launch ( );
}
}
Код: Выделить всё
4.0.0
work.basil.example
ExUnicodeGlyph
1.0-SNAPSHOT
ExUnicodeGlyph
UTF-8
org.openjfx
javafx-controls
23.0.1
org.openjfx
javafx-fxml
23.0.1
org.junit.jupiter
junit-jupiter
5.11.3
test
org.apache.maven.plugins
maven-compiler-plugin
3.13.0
23
23
org.openjfx
javafx-maven-plugin
0.0.8
default-cli
work.basil.example.exunicodeglyph/work.basil.example.exunicodeglyph.HelloApplication
app
app
app
true
true
true
Подробнее здесь: https://stackoverflow.com/questions/791 ... tly-on-the