Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode problem?!? in execCommand on Windows #1225

Open
emagnusandersson opened this issue Mar 23, 2024 · 4 comments
Open

Unicode problem?!? in execCommand on Windows #1225

emagnusandersson opened this issue Mar 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@emagnusandersson
Copy link

Hi,

This problem only occurs on Windows (not on Linux).

var funMain=async function(){
  var res=await Neutralino.os.execCommand("echo a") // (this works)
  var res=await Neutralino.os.execCommand("echo ä") // "Blocks" (Promise neither resolves nor rejects) on Windows 10
  var res=await Neutralino.os.execCommand("echo a") // (the program never gets here)
}
funMain()

Expected behaviour is that the promise should resolve.

neu CLI: v11.0.1
Neutralinojs binaries: v5.0.0
Neutralinojs client: v5.0.1
Project version: v1.0.0

Thank you in advance,
Best regards

@emagnusandersson emagnusandersson added the bug Something isn't working label Mar 23, 2024
@Hill-98
Copy link

Hill-98 commented Apr 21, 2024

Is there any progress or solution?

@Hill-98
Copy link

Hill-98 commented Apr 23, 2024

@shalithasuranga Can you fix this problem? Because it affects the command execution of Windows in non-English environments.

// working
console.log(await Neutralino.os.execCommand('node -e "console.log(\'你好世界\')"'))
console.log(await Neutralino.os.spawnProcess('node -e "console.log(\'你好世界\')"'))
// not working (block)
console.log(await Neutralino.os.execCommand('echo 你好世界'))
// not working (panic) (exitcode: 3221226505)
console.log(await Neutralino.os.spawnProcess('echo 你好世界'))

The above code shows that the non-English characters output by NodeJS are not affected, so I guess it is because the NodeJS output is UTF-8 encoded, while the Windows cmd output is the system encoding, which is GB2312 in the Chinese environment.

@hschneider
Copy link

This is also a show-stopper here in Germany with "äöüÄÖÜß" and France as well ... should be put on top priority.

@Hill-98
Copy link

Hill-98 commented Apr 23, 2024

And #1207, it also affects working properly in non-English environments.

Perhaps a comprehensive investigation of character encoding should be conducted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants