Files
DeepTutor/tests
Mohammad Hijjawi 630742b6cc fix: decode fetched pages with their declared <meta> charset
web_fetch decoded every response with httpx's response.encoding, which
only reads the Content-Type header and otherwise defaults to UTF-8. Pages
that declare their charset in the markup (common for GBK, Shift_JIS and
EUC-KR sites) came back as replacement characters in the web_fetch tool,
Immersive Reading URL imports and website knowledge-base crawls.

Pick the charset the way a browser does: byte-order mark, then the
Content-Type charset, then a <meta> declaration in the first 1024 bytes,
then UTF-8. Labels such as gb2312 and iso-8859-1 decode as their
superset encodings (gb18030, cp1252), matching the WHATWG Encoding
standard.
2026-10-17 23:30:55 +01:00
..
2026-10-08 11:34:42 +08:00
2026-10-08 11:34:42 +08:00
2026-09-29 17:12:58 +02:00
2026-10-08 11:34:42 +08:00
2026-10-04 21:35:00 +08:00