fix: CJK/Unicode wide character support (#13)

Set UTF-8 locale in all PTY spawn environments, add xterm-addon-unicode11
for proper double-width character measurement, and update LocalEchoOverlay
helpers to respect CJK character visual width in positioning, line wrapping,
and cursor placement.

Based on PR #13 by @TeigenZhang, adapted to current codebase structure.

Co-Authored-By: Tenggan Zhang <TeigenZhang@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-24 16:13:09 +01:00
co-authored by Tenggan Zhang Claude Opus 4.6
parent 5170c188c3
commit 3c29b1fa6e
6 changed files with 94 additions and 17 deletions
+13 -2
View File
@@ -1,12 +1,12 @@
{
"name": "claudeman",
"version": "0.1600",
"version": "0.1618",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claudeman",
"version": "0.1600",
"version": "0.1618",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -20,6 +20,7 @@
"uuid": "^10.0.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-unicode11": "^0.6.0",
"xterm-addon-webgl": "^0.16.0",
"zod": "^4.3.6"
},
@@ -4669,6 +4670,16 @@
"xterm": "^5.0.0"
}
},
"node_modules/xterm-addon-unicode11": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/xterm-addon-unicode11/-/xterm-addon-unicode11-0.6.0.tgz",
"integrity": "sha512-5pkb8YoS/deRtNqQRw8t640mu+Ga8B2MG3RXGQu0bwgcfr8XiXIRI880TWM49ICAHhTmnOLPzIIBIjEnCq7k2A==",
"deprecated": "This package is now deprecated. Move to @xterm/addon-unicode11 instead.",
"license": "MIT",
"peerDependencies": {
"xterm": "^5.0.0"
}
},
"node_modules/xterm-addon-webgl": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/xterm-addon-webgl/-/xterm-addon-webgl-0.16.0.tgz",