• Hi, my WordPress website renders only partial content of a post when the post_content table has Unicode characters like — or 0x00A0

    When I open the post in the post editor, I can see the full content, and then when I save it, the Unicode character is replaced with a ? and the post starts rendering properly.

    I tried changing the charset of wp_posts table and the post_content column to utf8mb4, but it didn’t fix the issue.

    I have manually replaced some characters via PHPMyAdmin, but there are a lot of characters. I have never encountered this issue before.

    Any idea how to fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Caution: changing the character set in the database does not change the characters in the database fields. You are much more likely to mess up the character sets, since new entries may have a different character set than the entries before the change.

    All in all your problem sounds strange. How old is the installation? Which WordPress version is used? Which PHP version, which database server? Are there any abnormalities under Tools > Site Health?

    Which “post editor” are you working with?

    Thread Starter wpdamn

    (@wpdamn)

    Hi, I had a backup, and fortunately changing the character set did not break anything.

    Here are the details you asked for:
    WordPress Version 6.2.2
    Server type: MariaDB
    Server version: 10.3.22-MariaDB – MariaDB Server
    Protocol version: 10
    Server charset: cp1252 West European (latin1)
    Database client version: libmysql – mysqlnd 8.1.16
    PHP extension: mysqli
    PHP version: 8.1.16

    Unfortunately, these are not all the answers yet.

    Are there any abnormalities under Tools > Site Health?

    Which “post editor” are you working with?

    Furthermore:
    Please have a look at Tools > Site Health > Info > Database to see what is specified there as “Database charset”.

    Thread Starter wpdamn

    (@wpdamn)

    My bad, missed those questions.

    I am using the Gutenberg block editor

    Site Health says “Good” with the following recommendations –
    – The scheduled event, rocket_preload_process_pending, failed to run.
    – Your website does not send all recommended security headers.

    Here’s the data from Site Health > Info > Database:
    Extension mysqli
    Server version 10.3.22-MariaDB
    Client version mysqlnd 7.4.28
    Database username optimist_wpt
    Database host 127.0.0.1
    Database name optimist_testo
    Table prefix wp_
    Database charset latin1
    Database collation utf8mb4_general_ci
    Max allowed packet size 268435456
    Max connections number 300

    Please let me know if you need anything else.

    • This reply was modified 1 year, 5 months ago by wpdamn.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post rendering stops when a Unicode character is encountered’ is closed to new replies.