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

Deprecate DefaultCharset, use UTF-8 directly #5512

Merged

Conversation

bplommer
Copy link
Member

The DefaultCharset alias served a purpose when it was introduced 6 years ago, but in 2021 anybody who has to think about charsets knows that UTF-8 is the universal default. By inlining it we remove the cognitive burden of needing to know that DefaultCharset is a global alias for UTF-8.

Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

Copy link
Member

@danicheg danicheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@@ -34,6 +34,7 @@ package object http4s {

type ParseResult[+A] = Either[ParseFailure, A]

@deprecated("Use Charset.`UTF-8` directly", "0.22.8")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (non-blocking at all):
perhaps, in the 0.23 series a 'since' version should be different. It may be a bit odd — deprecated in 0.22.8 and not in 0.23.0 :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think when Ross merges 0.22 -> 0.23 -> 1.0 he fixes these :)

@bplommer bplommer merged commit 2083b6f into http4s:series/0.22 Oct 29, 2021
@bplommer bplommer deleted the utf-8-is-the-universal-default branch October 29, 2021 18:38
rossabaker pushed a commit to http4s/http4s-scala-xml-1 that referenced this pull request Apr 19, 2022
armanbilge pushed a commit to http4s/http4s-scalatags that referenced this pull request May 2, 2022
armanbilge pushed a commit to http4s/http4s-twirl that referenced this pull request May 2, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants