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
-
[BUG]: Compliance rules never see Unity Catalog views as views可能已有人在做 @wagnercsantos 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
databrickslabs/ontos#1348 ·
维护者通常 3 天内回复
-
after-v0.1.0 bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
approved check:passed logos:add
难度 1/5 1 小时以内 新手友好度 74/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
AOSSIE-Org/BabyNest#310 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
pocoproject/poco#5659 ·
维护者通常 2 天内回复