• Resolved killbert

    (@killbert)


    When I edit a post in WordPress using the ‘Text’ mode and enter special characters via using & and euro; for instance for the Euro sign, things work fine. I publish the post and the characters appear ok on my site.

    If however I try to go back and edit the page, in the text-mode all special characters are displayed as they are and the encoding is gone (so & euro; is displayed as €).

    Here’s the strange thing. If I edit a post, go into text-edit mode rather than visual edit and enter a character code and THEN switch to visual mode WITHOUT saving or publishing and THEN switch back to the text edit mode tab, all my character codes are gone and in text edit mode IMMEDIATELY. So & euro; becomes € in text edit mode straight away. This happens both in Chrome and Safari browsers.

    On my server I have several WordPress sites with various WP versions, this happens to WP version 4.4 as well as older versions. My PHP version is 5.5.30.

    I checked the following without success:

    – changed the WP-config file UTF-8 settings and DB collate lines. Deleted them, defined UTF-8 specifically etc. Didn’t work.
    – checked MySql in phpMyAdmin. Server connection collation is UTF8_general_ci. Tried utf8mb4_general_ci as well. No success
    – some WP site are UTF8_general, some are UTF8mb4, both have same problem.
    – I switched off visual editor in my user account settings. Problem remains: I enter the characters in text-mode and save just fine. After I go back and reload the page in the editor, all my codes are replaced with the characters. Saving then causes all characters to replaced by a ? or just disappear.

    my pages are being served with the following header:

    meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″

    What else can I check? Can it be a Mac related browser issue as it happens straight away when switching from text to visual mode without saving or updating?
    Is it some other setting in my PHP server? (which is set as UTF8 by the way)….

Viewing 5 replies - 1 through 5 (of 5 total)
  • I was able to replicate the steps, but I don’t understand the issue. WordPress text editor is converting the HTML entities into the actual symbols. Don’t you want this to happen?

    Thread Starter killbert

    (@killbert)

    Fabio, once I edit and re-save the post, the special characters become question marks or disappear completely from my published pages.

    Something goes wrong when my data gets written into MySQL…but i don’t know where.

    Sorry, this was indeed not clear from my question :-S

    Thread Starter killbert

    (@killbert)

    Found a solution. My PHP.ini settings were wrong. I changed PHP.ini to this and problem is gone:

    default_charset = "utf-8"
    mbstring.internal_encoding=utf-8
    mbstring.http_output=UTF-8
    mbstring.encoding_translation=On
    mbstring.func_overload=6

    Oh! I see… Encoding issues are always a pain… I’m glad you found the problem ??

    I have been having this problem since, I believe, our hosting company updated our version of PHP in July. I have asked many, many times for our hosting company to update the server’s needed version of PHP again. These solutions I have tried and still cannot save the special character when it is in either the woocommerce title or post/page title. However, I can put the html code in and it will stick in the description or post. The code will remain in tact and will convert to the special character. It’s just the html code converts the title when saving and then if I go back in I have to re-enter the html again otherwise, when saving the special character will disappear. I’m wondering if there is any other setting I could try or anything else I could possibly do without having access to update the PHP.

    Thank you in advanced!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Special Characters problem’ is closed to new replies.