-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi @domenic et al,
I was looking into using this package for cheerio, but had several issues that I wanted to fix first. As extending the current html-encoding-sniffer package turned out to be cumbersome, I opted to write a new module instead:
https://github.com/fb55/encoding-sniffer
This new package implements the current version of the encoding sniffing algo as a state machine. That allows streams to be supported without much effort. Features this supports, which aren't present in html-encoding-sniffer:
- XML encoding types (UTF-16 prefixes and
<?xml encoding="...">) - Configurable sniff depth (see Add an option to change prescanning byte length #10)
x-user-definedin<meta>tags (turns outhtml-encoding-sniffer's support is broken)- Streams / sniffing of incomplete documents
I would love to join forces and have a single package that both jsdom and cheerio can use going forward. Let me know if this is something you'd be interested in!
Metadata
Metadata
Assignees
Labels
No labels