Results 1 to 12 of 12

Thread: UTF8 in MySQL

  1. #1
    Satoriguru is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    Question UTF8 in MySQL

    I've recently set up a WordPress blog which defines the character set as UTF8
    From my wp-config.php file:
    define('DB_CHARSET', 'utf8');
    My .htaccess file also stipulates UTF8 for a cacheing plugin:
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    Doesn't UTF8 include Russian characters? I can see nothing but question marks.

  2. #2
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Default

    Hi,

    These issues come up mostly after installing the blog through Fantastico, try installing one manually. Also,did you try using the "Russian Cyrillic" character set?

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  3. #3
    Gallier's Avatar
    Gallier is offline Junior Member
    Join Date
    Sep 2009
    Posts
    21

    Default

    Try it this version WP _http://maxsite.org/wp210rus/ and read this post _http://blog.sjinks.pro/mysql/3-convert-mysql-database-from-one-charset-to-another
    Make your website the fastest one - Web Optimizer* web.stakh.com

  4. #4
    Satoriguru is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    Default

    Rock - I installed my database manually using an import via phpMyAdmin.
    Gallier - I don't speak Russian, but I do post snippets of (translated) Russian for a few readers.

    The interesting bit is that different parts of the database are rendered in three character sets, with the SUM table in latin1_swedish_ci. - Confusing or what?

    Have a look at this image. It shows latin1_german2_ci, utf8_general_ci, and utf8_unicode_ci

    I guess that certain (back end) WordPress MySQL tables will only ever need to be encoded in one charset, but it doesn't explain why Cyrillic fails to render properly. Se this chart for full set.
    Last edited by Satoriguru; 26-10-2009 at 14:41. Reason: Omission

  5. #5
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by Satoriguru View Post
    Rock - I installed my database manually using an import via phpMyAdmin.
    Gallier - I don't speak Russian, but I do post snippets of (translated) Russian for a few readers.

    The interesting bit is that different parts of the database are rendered in three character sets, with the SUM table in latin1_swedish_ci. - Confusing or what?

    Have a look at this image. It shows latin1_german2_ci, utf8_general_ci, and utf8_unicode_ci

    I guess that certain (back end) WordPress MySQL tables will only ever need to be encoded in one charset, but it doesn't explain why Cyrillic fails to render properly. Se this chart for full set.
    Hi,

    After looking at the images, it appears that the database collation isn't correct. All the tables should be displaying UTF8_general_ci collation. Please open up a ticket with our support dept & provide us with the database in .SQL format, so we can have it restored directly from the server in a correct format..

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  6. #6
    Satoriguru is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    Default

    I'm sending the compressed SQL backup via ticket.

  7. #7
    eUK-Ralf's Avatar
    eUK-Ralf is offline Employee
    Join Date
    Apr 2008
    Posts
    217

    Cool

    Hi,

    I have restored the .sql file and change the Collation to utf8_general_ci. If you still face any problems, please reply to the same ticket.

  8. #8
    Satoriguru is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    Smile

    Quote Originally Posted by eUK-Ralf View Post
    Hi,

    I have restored the .sql file and change the Collation to utf8_general_ci. If you still face any problems, please reply to the same ticket.
    Thanks for that. In the end, I did a search and replace job on all the mangled characters with a brilliant WordPress plugin called "Search and Replace", naturally.
    (Changing the character set does not rewrite the mangled letters and glyphs to their original spellings, unfortunately.)

    The difficult bit was deciphering what the characters should have been before the mangling occurred.
    There were a lot of European names that could not easily be guessed at in mangle-ese. So I had to use the WayBackMachine to find all my old posts.

    Here's the plugin URL.

  9. #9
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by Satoriguru View Post
    Thanks for that. In the end, I did a search and replace job on all the mangled characters with a brilliant WordPress plugin called "Search and Replace", naturally.
    (Changing the character set does not rewrite the mangled letters and glyphs to their original spellings, unfortunately.)

    The difficult bit was deciphering what the characters should have been before the mangling occurred.
    There were a lot of European names that could not easily be guessed at in mangle-ese. So I had to use the WayBackMachine to find all my old posts.

    Here's the plugin URL.
    Hi,

    The text mangling occurs when you download the SQL file on your local machine [which doesn't support the special characters], edit & save it in such a way that the chars are replaced/mangled.. Glad to know that the issue has been sorted & thank you for sharing the helpful plug-in

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  10. #10
    Satoriguru is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    Default

    Thanks for all your help in sorting it out!

  11. #11
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by Satoriguru View Post
    Thanks for all your help in sorting it out!
    You're welcome

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  12. #12
    nancy86 is offline new member
    Join Date
    Jan 2010
    Posts
    7

    Default

    Thanks for your great help I am really in a mess.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •