mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 21:44:59 +08:00
修复导出json和markdown时中文及其他utf8字符乱码问题
This commit is contained in:
@@ -52,9 +52,9 @@ export async function downloadAs(text: string, filename: string) {
|
||||
|
||||
if (result !== null) {
|
||||
try {
|
||||
await window.__TAURI__.fs.writeBinaryFile(
|
||||
await window.__TAURI__.fs.writeTextFile(
|
||||
result,
|
||||
new Uint8Array([...text].map((c) => c.charCodeAt(0)))
|
||||
text
|
||||
);
|
||||
showToast(Locale.Download.Success);
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user