-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[bug] @tauri-apps/api/shell exists utf8 parsing error on window #4644
Comments
By the way, has the problem been solved |
Sorry, I've been busy with work lately and I probably won't have time to address this issue until this weekend. |
I am Windows |
Thank you for helping me with the coding problem |
This issue is not related to tauri. I guess it should work like this in PowerShell: |
good, Thank you for your great help |
Describe the bug
When I use the simplified Chinese version of window, the console will return GBK encoded data and an
invalid utf-8 sequence of 1 bytes from index 0
error will occur. I think all non-English versions of window may have that problem.Reproduction
import { Command } from '@tauri-apps/api/shell';
new Command('cmd', ['/C','echo 你好,世界']).execute();
After that, you will get the error.
Expected behavior
No string parsing errors.
Platform and versions
Stack trace
No response
Additional context
In fact, I think the error comes from this line,and I'd be happy to submit a PR in a few days to allow the user to specify the encoding (default utf-8) if you agree.
The text was updated successfully, but these errors were encountered: