mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
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 |
||
|---|---|---|
| .. | ||
| src | ||
| index.ts | ||
| package.json | ||
| test-setup.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||