Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

graal-utf-8-object-pascal

A test for passing UTF-8 strings from Object Pascal/FreePascal to GraalVM and back

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

Tests for GraalVM/FreePascal UTF-8 string passing

A test for passing UTF-8 strings from Object Pascal/FreePascal to GraalVM and back

Prerequisites

Building the DLL

  1. Start the x64 Native Tools Command Prompt for VS 2017 from the start menu.

  2. In that command prompt start C:\Program Files\Java\graalvm-ce-java17-22.3.3\graal-cmd-17.cmd

  3. cmd
    javac Main.java
  4. cmd
    chcp 65001
    native-image -H:Name=libtestutf8 -J-Dfile.encoding=UTF-8 --shared

    Note: To see some encoding problems remove the -J-D... parameter and or compile with chcp 1252

Building the FreePascal test program

Open the Project graalutf8.lpi in Lazarus IDE and hit run. To use the resulting graalutf8.exe as a pure console program add at -ci parameter.