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
When I execute my PowerShell command on PowerShell's window, it output like this:
And I coding GDScript like this:
But It prints like this:
Because PowerShell return not valid UTF-8, so I think maybe OS.execute should output PackedByteArray and I can code like this for solve this problem:
FYI: This behavior is not limited to PowerShell, using Command Prompt has the same issue if I remember correctly.
As the default output encoding on Windows is system locale dependent, It seems that we should either use PackedByteArray instead of String, or find a way to retrieve the "Unicode" output.
PackedByteArray won't help, Windows console output default to ASCII, so it's not sending full characters through the pipe.
Normally, encoding can be set be the shell (using chcp command) or app that's writing to the console SetConsoleOutputCP, but seems like it can't be set by the parent process.
Godot version
v4.0.alpha7.official [3e9ead0]
System information
windows10 64bit
Issue description
When I execute my PowerShell command on PowerShell's window, it output like this:
And I coding GDScript like this:
But It prints like this:
Because PowerShell return not valid UTF-8, so I think maybe OS.execute should output PackedByteArray and I can code like this for solve this problem:
Steps to reproduce
Please run the reproduction project
Minimal reproduction project
OsExecTest.zip
The text was updated successfully, but these errors were encountered: