Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charset for html #108

Open
troelsarvin opened this issue Apr 18, 2022 · 1 comment
Open

Charset for html #108

troelsarvin opened this issue Apr 18, 2022 · 1 comment

Comments

@troelsarvin
Copy link

headers has a text_utf8 constructor for ContentType. I suggest a html_utf8 constructor be added, as well, resulting in

Content-Type: text/html; charset=utf-8

Motivation: If the charset is not set for the text/html content type, then it defaults to ISO-8859-1, but in many situations, the charset is really UTF-8.

@jplatte
Copy link
Contributor

jplatte commented Apr 18, 2022

Maybe it would be possible to have ContentType::utf8(self) -> Self and deprecate ContentType::text_utf8() in favor of ContentType::text().utf8()?

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

No branches or pull requests

2 participants