WordPress.org

Forums

[resolved] Chinese characters turn into question marks (12 posts)

  1. DavidFeng
    Member
    Posted 7 years ago #

    Please help - I'm on HostICan. Unfortunately after installing WordPress on a domain I host there, I try posting in Chinese -- only to see the Chinese characters turn into question marks. I have never ever had this problem happen in WordPress on any other web host I use (DreamHost, Itsamac), so I contacted HostICan; however, they referred me to WordPress for eventual support.

    I've set it in the Options bit that UTF-8 is the default language/encoding to be used; however, this still won't work. Any help would be appreciated. Thanks!

  2. MichaelH
    Member
    Posted 7 years ago #

    Do you have these

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    in your wp-config.php file?

    Resource:
    http://codex.wordpress.org/Editing_wp-config.php

  3. DavidFeng
    Member
    Posted 7 years ago #

    I took a look at that and this as well: http://wordpress.org/support/topic/120135?replies=12

    Unfortunately when I added the "//", the entire website goes south with this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/globalma/public_html/beipod.cn/wp-config.php:47) in /home/globalma/public_html/beipod.cn/wp-includes/pluggable.php on line 331

    Regrettably, not the very best start with WordPress on HostICan...

  4. moshu
    Member
    Posted 7 years ago #

    You have an empty/blank line or a space after the closing ?> in the wp-config file.

  5. DavidFeng
    Member
    Posted 7 years ago #

    I'm afraid that this... worked! ;-) You guys are great, thank you so much. :-)

  6. MichaelH
    Member
    Posted 7 years ago #

    I'm afraid to say, but You are Welcome! ;)

  7. rachely
    Member
    Posted 7 years ago #

    I also solved the Chinese character problem by following your suggestion. THANKS!!! This is my wp-config file for others to see where I edited the lines:

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'xxx'); // The name of the database
    define('DB_USER', 'xxxxx'); // Your MySQL username
    define('DB_PASSWORD', 'xxxx'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    // define('DB_CHARSET', 'utf8');
    // define('DB_COLLATE', '');

  8. moshu
    Member
    Posted 7 years ago #

    Just don't post ever your password publicly... [edited]

  9. rachely
    Member
    Posted 7 years ago #

    Thanks :-) In all my excitement, I did a stupid one!

  10. wankongyew
    Member
    Posted 7 years ago #

    I'm having a similar problem. I've done this for a few WordPress upgrades now, upgrading via Fantastico and deleting the two lines in wpconfig to get the Chinese characters.

    It worked fine until today when I did the Fantastico upgrade to 2.3.3. Now even after deleting the two lines, the Chinese characters still fail to display correctly. I'm at my wit's end here. Any help will be appreciated.

  11. wankongyew
    Member
    Posted 7 years ago #

    Here's a copy of the wpconfig, but the Chinese characters still won't show up. The site is at passionforarts.com

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'xxx'); // The name of the database
    define('DB_USER', 'xxx'); // Your MySQL username
    define('DB_PASSWORD', 'xxx'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    // define('DB_CHARSET', 'utf8');
    // define('DB_COLLATE', '');

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* That's all, stop editing! Happy blogging. */

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

  12. wankongyew
    Member
    Posted 7 years ago #

    Please ignore me. I was being stupid. I have mistakenly been trying to edit the wpconfig file of a different blog. Works fine now.

Topic Closed

This topic has been closed to new replies.

About this Topic