Announcement

Collapse
No announcement yet.

UTF8 in MySQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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 Daniel

    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    Comment


    • #3
      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

      Comment


      • #4
        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, 14:41. Reason: Omission

        Comment


        • #5
          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 Daniel

          Follow eUKhost on Twitter || Join eUKhost Community on Facebook

          Comment


          • #6
            I'm sending the compressed SQL backup via ticket.

            Comment


            • #7
              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.
              eUK_Ralf

              ||

              Comment


              • #8
                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.

                Comment


                • #9
                  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 Daniel

                  Follow eUKhost on Twitter || Join eUKhost Community on Facebook

                  Comment


                  • #10
                    Thanks for all your help in sorting it out!

                    Comment


                    • #11
                      Originally posted by Satoriguru View Post
                      Thanks for all your help in sorting it out!
                      You're welcome
                      Rock _a.k.a._ Jack Daniel

                      Follow eUKhost on Twitter || Join eUKhost Community on Facebook

                      Comment


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

                        Comment

                        Working...
                        X