wingman-jr-addon / wingman_jr

This is the official repository (https://github.com/wingman-jr-addon/wingman_jr) for the Wingman Jr. Firefox addon, which filters NSFW images in the browser fully client-side: https://addons.mozilla.org/en-US/firefox/addon/wingman-jr-filter/ Optional DNS-blocking using Cloudflare's 1.1.1.1 for families! Also, check out the blog!
https://wingman-jr.blogspot.com/
Other
35 stars 6 forks source link

Extended text encoding #205

Closed wingman-jr-addon closed 2 months ago

wingman-jr-addon commented 2 months ago

Fixes (mostly) #201 . In particular, support for various Windows codepages. The approach here is to basically implement the basics of TextEncoder for more encodings by mapping from MDN's list of supported decoding charsets to the .NET System.Text.Encoding encoders and programmatically generating maps in JSON.

The file at tests/verify_encodings/index.html shows a mapping of the UTF-8 points to iframes with the decoding charset set natively. To test, serve locally via e.g. python3 -m http.server. There are still some discrepancies but I believe with limitations and in the aliases as well as some known e.g. translation rules these are somewhat unavoidable and even with some of the discrepancies it's better to move forward with this in the codebase.