-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
status: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug
Description
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
Environment
› OS: Windows 10.0.19044 X64
› Webview2: 103.0.1264.49
› MSVC:
- Visual Studio ���ɹ��� 2019
› Node.js: 16.15.1
› npm: 8.11.0
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.24.3
› rustc: 1.62.0
› cargo: 1.62.0
› Rust toolchain: stable-x86_64-pc-windows-msvc
Packages
› @tauri-apps/cli [NPM]: 1.0.0 (outdated, latest: 1.0.3)
› @tauri-apps/api [NPM]: 1.0.1 (outdated, latest: 1.0.2)
› tauri [RUST]: 1.0.0,
› tauri-build [RUST]: 1.0.0,
› tao [RUST]: 0.11.2,
› wry [RUST]: 0.18.3,
App
› build-type: bundle
› CSP: unset
› distDir: ../build
› devPath: http://localhost:3000/
› framework: React
App directory structure
├─ .git
├─ .vscode
├─ build
├─ node_modules
├─ public
├─ rumqtt
├─ scripts
├─ src
└─ src-tauriStack 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug