WordPress.org

Support

Support » How-To and Troubleshooting » Can no longer set character encoding

Can no longer set character encoding

  • Because I need to be able to display Vietnamese characters I spent a long time last summer figuring out how to set the charset in my MySql database, but the final bit was being able to set the encoding in WP under Settings >> Reading to utf8_general_ci. Now I cannot find the option for making that change. It’s just not there on the Reading page.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator kmessinger

    @kmessinger

    Forum Moderator

    I think it is done in the wp-config file.
    You can change it to match the database

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘ utf8_general_ci’);

    Make sure you have a copy of the original wp-config.php

    Right. Got that. But there used to be a place in Settings >> Readings to put in the charset. Maybe it’s no longer necessary in 3.5.1?

    Unfortunately, after updating, the encoding is broken on my site right now — it’s full of those dreaded question marks in little diamonds.

    Moderator kmessinger

    @kmessinger

    Forum Moderator

    That was removed as of 3.5. WordPress defaults to utf8.

    Can you post a link to your site?

    Moderator kmessinger

    @kmessinger

    Forum Moderator

    Here is the site url:

    http://sharpsand.net

    the Codex says that utf8 is almost always the best option. Okay. But I had to go to utf8_general_ci because I wanted to display Vietnamese characters & there is not yet a dedicated utf8 language charset for Vietnamese.

    The site still seems to be able to display Vietnamese correctly–it is those inserted question marks that has changed.

    Moderator kmessinger

    @kmessinger

    Forum Moderator

    When you see a ?-in-a-diamond, that means that the browser, displaying a page in UTF-8 mode, has been given an invalid character code. But when I look at the source there is no code in those places.

    How is this text being entered? Is it copied and pasted?

    The site still seems to be able to display Vietnamese correctly–it is those inserted question marks that has changed.

    Does the Vietnamese show any strange character?

    The Vietnamese is OK.

    All the posts were entered using the WP editor, no cut & paste. I think it’s mostly m-dashes — and double quotation marks that get replaced, but I’m not 100% sure if those are the only characters.

    Moderator kmessinger

    @kmessinger

    Forum Moderator

    Looks like changing to western European solved it. I was looking at old posts to see if it occurred there but I didn’t see any. Probable looking as you changed it.

    I did find that this was the code, & # 65533 ; (spaces added) which led me to this http://www.fileformat.info/info/unicode/char/fffd/index.htm which is all Greek to me :^)

    Not sure what you are saying here. I haven’t changed anything & the question marks remain. I do have a ticket in at Bluehost so perhaps they are fiddling with it — I have not had any notice from them, however.

    Moderator kmessinger

    @kmessinger

    Forum Moderator

    Sorry, confused myself. In both IE and FF I changed the coding to iso-8859-1 and everything looked fine.

    You might also want to post here, http://wordpress.org/support/theme/suffusion.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Can no longer set character encoding’ is closed to new replies.