fix(sql): decode opened SQL files with charset fallback

This commit is contained in:
t8y2 committed 2026-06-08 17:45:09 +08:00
1 parent 3fc6c0eaba
commit 465ed195cf
2 files changed
+16 -3

No files matched your search

+1 -2
View File
@@ -454,10 +454,9 @@ async function openSqlFile() {
try {
if (isTauriRuntime()) {
const { open } = await import("@tauri-apps/plugin-dialog");
const { readTextFile } = await import("@tauri-apps/plugin-fs");
const path = await open({ filters: [{ name: "SQL", extensions: ["sql"] }], multiple: false });
if (path) {
const content = await readTextFile(path as string);
const content = await api.readExternalSqlFile(path as string);
queryStore.updateSql(tab.id, content);
}
} else {