CSV export fails on non-ascii characters
還沒有人認領這個 Issue。
評估
研究方向
從結果窗格中的「Save as CSV」動作開始,追蹤它如何將查詢結果寫入所選檔案;報告顯示,當結果包含西里爾字母或哈薩克語字元時,Windows 上會發生故障。使用提供的 SQL 查詢重現,並確認儲存成功,且 CSV 包含所有資料列,文字與結果窗格中的相同。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
CSV export fails when the result set contains at least some non-ASCII characters anywhere in it (I work with russian and kazakh languages so I've experienced this issue with letters from those languages) .
The resulting csv file only contains data before the non-ASCII character.
To Reproduce
Steps to reproduce the behavior:
- Execute a query that returns rows containing non-ASCII characters:
select * from (values ('ascii-characters'), ('А'), ('а'), ('Ә'), ('ә'), ('Б'), ('б'), ('В'), ('в'), ('Г'), ('г'), ('Ғ'), ('ғ'), ('Д'), ('д'), ('Е'), ('е'), ('Ё'), ('ё'), ('Ж'), ('ж'), ('З'), ('з'), ('И'), ('и'), ('Й'), ('й'), ('К'), ('к'), ('Қ'), ('қ'), ('Л'), ('л'), ('М'), ('м'), ('Н'), ('н'), ('Ң'), ('ң'), ('О'), ('о'), ('Ө'), ('ө'), ('П'), ('п'), ('Р'), ('р'), ('С'), ('с'), ('Т'), ('т'), ('У'), ('у'), ('Ұ'), ('ұ'), ('Ү'), ('ү'), ('Ф'), ('ф'), ('Х'), ('х'), ('Һ'), ('һ'), ('Ц'), ('ц'), ('Ч'), ('ч'), ('Ш'), ('ш'), ('Щ'), ('щ'), ('Ъ'), ('ъ'), ('Ы'), ('ы'), ('І'), ('і'), ('Ь'), ('ь'), ('Э'), ('э'), ('Ю'), ('ю'), ('Я'), ('я') ) as kz_alphabet(letter); - In the results pane, click "Save as CSV" button and proceed saving the file
- See error (popup and in the output pane for the extension):
Failed to save results. Failed to save vscode-export-test.csv: 'charmap' codec can't encode character '\u0410' in position 0: character maps to <undefined> - Examine the file - it only contains data before non-ASCII characters appear in the query results:
letter
ascii-characters
Expected behavior
No error, popup indicating success shown, file contains all data rows, rows content is the same as in the query results pane
VS Code version
Version: 1.142.0 (system setup)
Commit: 6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1
Date: 2026-10-15T03:02:17Z
Electron: 43.7.7
ElectronBuildId: 15553055
Chromium: 150.0.7871.250
Node.js: 24.21.0
V8: 15.0.245.31-electron.0
@github/copilot: 1.0.95-0.unstable.r38345923974.g3754b70
@github/copilot-sdk: 1.0.19.38345923974.g3754b70
OS: Windows_NT x64 10.0.26200
Extension Logs
[1:21:27 PM] Started saving results to c:\path\to\query\results\vscode-export-test.csv
[1:21:27 PM] Failed to save results. Failed to save vscode-export-test.csv: 'charmap' codec can't encode character '\u0410' in position 0: character maps to
- 主要語言
- 沒有語言資料
- 星號
- 406
- 分支
- 35
- 平均合併
- 2 小時 47 分鐘
- 30 天內合併 PR
- 5
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-pgsql 的其他 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/vscode-pgsql#190 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 48/100
microsoft/vscode-pgsql#323 · 2 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
microsoft/vscode-pgsql#319 ·
-
難度 4/5 1-2 天 新手友好度 25/100
microsoft/vscode-pgsql#318 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 48/100
microsoft/vscode-pgsql#317 · 1 則留言 ·
查看 microsoft/vscode-pgsql 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 2 天內回覆
-
kind/bug priority/medium qa_automation
難度 2/5 1-3 小時 新手友好度 78/100
yugabyte/yugabyte-db#37324 ·
維護者通常 1 天內回覆
-
tech-debt: credits.sql — twelve generated queries over the retired AI-credit ledger have no caller未關閉tech-debt
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難度 2/5 1-3 小時 新手友好度 72/100
carlos-emr/carlos#5816 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
bitcoinjs/bitcoinjs-lib#2375 ·
維護者通常 4 天內回覆