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 issues on PHP 8.1+ #12758

Closed
swissspidy opened this issue Nov 30, 2022 · 0 comments · Fixed by #12759
Closed

Charset issues on PHP 8.1+ #12758

swissspidy opened this issue Nov 30, 2022 · 0 comments · Fixed by #12759
Assignees
Labels
AMP Output Issues related to AMP output and validation Group: WordPress Changes related to WordPress or Gutenberg integration Type: Bug Something isn't working

Comments

@swissspidy
Copy link
Collaborator

Bug Description

It was reported to us a couple of times that there are character issues on PHP 8.1.

I noticed it has to do with DOMDocument not recognizing <meta charSet="utf-8"/> (with uppercase S, as output by React) properly and thus assuming an incorrect encoding.

Expected Behaviour

UTF-8 characters should be displayed as expected.

Steps to Reproduce

  1. Use PHP 8.1
  2. Create a story with content like
    హలో
    â, î ñ ô ü
    español
    गईं।
    English
    தமிழ்
    
  3. Preview story

Screenshots

Incorrect:
Screenshot 2022-11-30 at 11 40 02

Correct:

Screenshot 2022-11-30 at 11 40 09

Additional Context

  • Plugin Version: 1.27.0
  • WordPress Version: 6.1
  • Operating System: macOS
  • Browser: Chrome
  • PHP Version: 8.1
@swissspidy swissspidy added Type: Bug Something isn't working Group: WordPress Changes related to WordPress or Gutenberg integration AMP Output Issues related to AMP output and validation Pod: WP labels Nov 30, 2022
@swissspidy swissspidy self-assigned this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP Output Issues related to AMP output and validation Group: WordPress Changes related to WordPress or Gutenberg integration Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant