Files
LobsterAI/src
btc69m979y-dotcom 898dbbecd4 fix: always prefer UTF-8 when strict decode succeeds in proxy encoding detection
The scoring heuristic for GB18030 vs UTF-8 could false-positive on longer
CJK strings because UTF-8 CJK bytes reinterpreted as GB18030 also produce
CJK characters with comparable scores, defeating the margin.

Since genuine GB18030 CJK byte sequences are almost never valid UTF-8
(strict mode), a successful UTF-8 strict decode means the body IS UTF-8.
Remove the scoring heuristic and always return utf8Decoded when strict
decode passes. GB18030 fallback still applies when UTF-8 decode fails.
2026-03-19 15:14:19 +08:00
..