Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake the parser decode input from document's encoding #22432
Conversation
highfive
commented
Dec 12, 2018
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try=wpt |
highfive
commented
Dec 12, 2018
Make the parser decode input from document's encoding
|
|
The document's encoding is only computed from the Content-Type header for now, with no sniffing at all.
| let encoding = content_type | ||
| .get_param(mime::CHARSET) | ||
| .and_then(|charset| Encoding::for_label(charset.as_str().as_bytes())) | ||
| .unwrap_or(UTF_8); |
This comment has been minimized.
This comment has been minimized.
SimonSapin
Dec 12, 2018
Member
I think this fallback is incorrect per spec, but it’s likely better until we implement <meta charset> sniffing.
|
Nice! @bors-servo r+ |
|
|
Make the parser decode input from document's encoding <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22432) <!-- Reviewable:end -->
|
|
|
@bors-servo retry #13480 |
Make the parser decode input from document's encoding <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22432) <!-- Reviewable:end -->
|
|
|
@bors-servo retry #22430 |
|
|
|
|
|
@bors-servo retry #22430 |
Make the parser decode input from document's encoding <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22432) <!-- Reviewable:end -->
|
|
nox commentedDec 12, 2018
•
edited by SimonSapin
This change is