Fixes #5620, and adds a few extra test cases. Currently waiting on a few upstream PRs in rust-encoding to land. Source-Repo: https://github.com/servo/servo Source-Revision: f7c3544d75f277f8ac82c54f075d53042761b344
Source-Repo: https://github.com/servo/servo Source-Revision: 254f2a3b5fb0ef59eff4b24cbf0f5c6ca90c4317