easysoft / phpmicro

micro sfx SAPI for php
Apache License 2.0
255 stars 30 forks source link

Issues printing Unicode characters. #15

Closed comanche closed 7 months ago

comanche commented 7 months ago

描述 (Description)

Cannot print Unicode characters properly on the CLI.

Create this test.php file:

echo "\u{1000}";

Download micro.sfx from php-8.3.4-micro-win.zip

Extract the micro.sfx from the php-8.3.4-micro-win.zip to the same directory as test.php.

Create the test.exe

copy /b micro.sfx + test.php test.exe

Run test.exe.

期望 (Expectation)

The following should have been printed on the CLI.

က

Running php test.php prints the above correctly.

结果 (Result)

Actual result:

က

or in HEX:

E1 80 80

软件版本 (Software version)

Php 8.3.4 with Micro

comanche commented 7 months ago

Looks like I can use the following:

exec('CHCP 65001');
echo "\u{1000}";