qwen-code/packages/cli
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
..
src fix: preserve original encoding when reading/writing non-UTF-8 files 2026-03-04 14:52:46 +08:00
index.ts Merge tag 'v0.3.0' into chore/sync-gemini-cli-v0.3.0 2025-09-11 16:26:56 +08:00
package.json chore: bump version to 0.11.1 2026-03-01 10:51:30 +08:00
test-setup.ts # 🚀 Sync Gemini CLI v0.2.1 - Major Feature Update (#483) 2025-09-01 14:48:55 +08:00
tsconfig.json feat: move extension to core package 2026-01-14 15:30:27 +08:00
vitest.config.ts refactor(core): Unify package exports and improve dev experience 2026-02-01 11:59:05 +08:00