qwen-code/packages/cli/src
LaZzyMan a5eb1733fa fix: preserve original encoding when reading/writing non-UTF-8 files
Fixes #2069

- Add iconv-lite dependency for non-UTF-8 encoding support
- Add iconvHelper.ts as a CJS/ESM compatibility wrapper
- Update readFileWithEncoding() to detect and handle GBK/Big5/Shift_JIS
  using BOM detection -> UTF-8 validation -> chardet -> iconv-lite fallback
- Add detectFileEncoding() to identify file encoding before writes
- Update writeTextFile() to accept encoding option and encode with iconv-lite
- Update WriteFileTool and EditTool to detect and preserve original encoding
- Add tests for GBK read/write, detectFileEncoding, and encoding option
2026-03-04 14:52:46 +08:00
..
acp-integration fix: preserve original encoding when reading/writing non-UTF-8 files 2026-03-04 14:52:46 +08:00
commands feat(mcp): auto-detect transport type from URL in mcp add command 2026-02-08 11:11:02 +08:00
config feat(cli): add Ctrl+Y shortcut to retry failed requests (#2011) 2026-03-02 17:59:18 +08:00
constants feat(cli): improve auth dialog UX with clearer three-option layout 2026-03-01 15:22:35 +08:00
core Merge pull request #1637 from QwenLM/fix/output-language-init-timing 2026-01-29 11:14:07 +08:00
i18n feat(auth): update coding plan description to reflect all available models 2026-03-02 21:51:47 +08:00
nonInteractive feat: add --session-id support for CLI and SDK 2026-02-13 21:40:57 +08:00
patches adh/bugfix/1563 (#4822) 2025-07-25 16:39:37 +00:00
services refactor: Extract web-templates package and unify build/pack workflow 2026-02-26 21:02:46 +08:00
test-utils Merge branch 'main' into feat/extension 2026-01-14 17:56:01 +08:00
ui feat(auth): update coding plan description to reflect all available models 2026-03-02 21:51:47 +08:00
utils Merge pull request #2005 from zhangxy-zju/feat/strengthen-output-language-template 2026-03-02 23:07:18 +08:00
gemini.test.tsx fix: add model resolution warnings to start warnings 2026-02-26 14:43:07 +08:00
gemini.tsx fix: add model resolution warnings to start warnings 2026-02-26 14:43:07 +08:00
nonInteractiveCli.test.ts feat: add MCP tool progress update support in TUI and SDK mode 2026-02-08 15:48:13 +08:00
nonInteractiveCli.ts feat: add MCP tool progress update support in TUI and SDK mode 2026-02-08 15:48:13 +08:00
nonInteractiveCliCommands.test.ts fix: explicit output if command is not supported 2025-12-26 17:55:03 +08:00
nonInteractiveCliCommands.ts feat(cli): migrate console calls to debugLogger and stdioHelpers (M3 Phase 7-9) 2026-01-26 15:02:37 +08:00
validateNonInterActiveAuth.test.ts refactor(debug): replace ConsolePatcher with debugLogger and update error reporting 2026-02-02 17:37:54 +08:00
validateNonInterActiveAuth.ts Merge branch 'main' into feat/debug-logging-refactor 2026-02-01 20:47:38 +08:00