Skip to content

Autodetect undeclared encodings, hinted by the response URL's TLD - #17

Merged
shaneaevans merged 5 commits into
scrapy:mainfrom
AdrianAtZyte:encoding-autodetect
Oct 10, 2026
Merged

shaneaevans merged 5 commits into
scrapy:mainfrom
AdrianAtZyte:encoding-autodetect

Conversation

@AdrianAtZyte

Copy link
Copy Markdown
Contributor

No description provided.

@AdrianAtZyte
AdrianAtZyte marked this pull request as ready for review October 1, 2026 17:59
Autodetection decides UTF-8 with a strict decode of the whole document.
simdutf8's compat API returns what std::str::from_utf8 does, including
error_len(), which separates a sequence cut off at EOF from invalid
bytes, and stops at the first error.

On ARM64, an undeclared multibyte UTF-8 page with a first-value schema
extracts about 75% faster (200 KB and 1.2 MB pages). Legacy-encoding,
invalid-UTF-8 and declared pages are unchanged within noise.
@shaneaevans
shaneaevans merged commit eaf5cff into scrapy:main Oct 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants