Files
DeepTutor/deeptutor/tools
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-06-17 00:56:27 +08:00
2026-09-06 13:46:29 +08:00
2026-04-23 19:29:16 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-05-12 02:20:30 +08:00
2026-04-23 19:29:16 +08:00
2026-06-17 00:56:27 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-08-19 17:34:52 +08:00