Problem/Motivation

Symfony has changed UTF-8 to utf-8 as this is considered preferable (though browsers universally accept both). See https://github.com/symfony/symfony/pull/60685 for the PR where this was introduced.

This means we now have some mismatches where Symfony sets the header vs where Drupal sets the header; for consistency we should follow Symfony and convert all remaining uses where we set the charset explicitly.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3555537

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

longwave’s picture

Issue summary: View changes

longwave’s picture

Status: Active » Needs review

As per RFC 9110:

For example, the following media types are equivalent in describing HTML text data encoded in the UTF-8 character encoding scheme, but the first is preferred for consistency (the "charset" parameter value is defined as being case-insensitive in [RFC2046], Section 4.1.2):

  text/html;charset=utf-8
  Text/HTML;Charset="utf-8"
  text/html; charset="utf-8"
  text/html;charset=UTF-8

Following Symfony, I've replaced all instances of charset=UTF-8 with charset=utf-8 for consistency.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks all places are fixed

  • catch committed 1dc33e4b on 11.x
    task: #3555537 Use charset=utf-8 instead of charset=UTF-8 in content...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.