You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After correction solving of the issue #34, I created Windows GitHub Actions workflows to use.
The Jule API and Jule standard library uses the WriteConsoleW function of Windows for writing to console. The WriteConsoleW function usually used in Unicode cases, uses UTF-16 encoding. Jule uses UTF-8 encoded strings by default which is supports Unicode characters also, therefore calls WriteConsoleW function after UTF-8 to UTF-16 conversion.
This operation works fine on our local test systems; on 2 different AMD64 Windows 10 and single ARM64 Windows 11, works as expected. On GitHub Actions with windows-latest, the WriteConsoleW function returns zero which is means failed.
I created a new workflow with simple C++ program and tested with to understand whether this problem relevant with Jule implementation.
And that's my compile command: clang++ -O0 --std=c++17 -o main.exe main.cpp -lshell32 -lkernel32
The test program above, writes hello world to the stdout handle. The variable text stores UTF-16 encoded hello world characters with NULL termination. Works as expected on local machines unlike GitHub Actions. On GitHub Actions, will not prints anything and failed.
Additional information
GitHub Actions uses UTF-8 by default. Printing with std::cout or std::wcout with UTF-8 encoded strings works and displayed fine, but std::wcout output is not displayed well with UTF-16 encoded strings.
As far as I tested, GitHub Actions's "UTF-8 by default" approach is not a problem. I tested on local machines with UTF-8 localization and calling WriteConsoleW function with UTF-16 encoded strings works and displayed as expected.
The text was updated successfully, but these errors were encountered:
What would you like to share?
After correction solving of the issue #34, I created Windows GitHub Actions workflows to use.
The Jule API and Jule standard library uses the
WriteConsoleW
function of Windows for writing to console. TheWriteConsoleW
function usually used in Unicode cases, uses UTF-16 encoding. Jule uses UTF-8 encoded strings by default which is supports Unicode characters also, therefore callsWriteConsoleW
function after UTF-8 to UTF-16 conversion.This operation works fine on our local test systems; on 2 different AMD64 Windows 10 and single ARM64 Windows 11, works as expected. On GitHub Actions with
windows-latest
, theWriteConsoleW
function returns zero which is means failed.I created a new workflow with simple C++ program and tested with to understand whether this problem relevant with Jule implementation.
That's my simple C++ program to test;
And that's my compile command:
clang++ -O0 --std=c++17 -o main.exe main.cpp -lshell32 -lkernel32
The test program above, writes
hello world
to the stdout handle. The variabletext
stores UTF-16 encodedhello world
characters with NULL termination. Works as expected on local machines unlike GitHub Actions. On GitHub Actions, will not prints anything and failed.Additional information
GitHub Actions uses UTF-8 by default. Printing with
std::cout
orstd::wcout
with UTF-8 encoded strings works and displayed fine, butstd::wcout
output is not displayed well with UTF-16 encoded strings.As far as I tested, GitHub Actions's "UTF-8 by default" approach is not a problem. I tested on local machines with UTF-8 localization and calling
WriteConsoleW
function with UTF-16 encoded strings works and displayed as expected.The text was updated successfully, but these errors were encountered: