-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Describe the bug
Using writeFile API with unicode payload results in failed to match a command error.
To Reproduce
Implement a minimal function:
import {
Dir, writeFile,
} from 'tauri/api/fs';
function pleaseWrite() {
writeFile({ path: 'unicodeTest.txt', contents: 'å' }, { dir: Dir.Cache });
}Receive the subsequent error in WebView console:
failed to match a command for {"callback":"499c79fd-8dde-4720-e708-d94956083059","error":"b4aa06f4-a06f-45b1-66d5-b69bdc463d43","cmd":"writeFile","path":"unicodeTest.txt","contents":"å","options":{"dir":2}}], trailing characters at line 1 column 178
Expected behavior
The file contents are written without error.
Platform and Versions (please complete the following information):
OS: macOS 10.14.6
Node: 12.18.0
NPM: 6.14.4
Yarn: -
Rustc: 1.45.0
taurijs: 0.11.0 (also appears in 0.10.0)
tauri.rs: 0.9.0 (also appears in 0.8.0)
Additional context
I realize that I have only been trying this in dev.
Reactions are currently unavailable