Convert MySQL Database to UTF-8 in Wordpress | /en/2009/05/convert-mysql-database-to-utf-8-in-wordpress/
Convert MySQL Database to UTF-8 in Wordpress
https://yihui.org/en/2009/05/convert-mysql-database-to-utf-8-in-wordpress/
https://yihui.org/en/2009/05/convert-mysql-database-to-utf-8-in-wordpress/
Guest *r-sn.com* @ 2009-06-28 21:22:59 originally posted:
thank you ..
plugin nice ..
but links i have not Convert to UTF-8 .. :x
Guest *r-sn.com* @ 2009-06-28 21:24:32 originally posted:
Example:
% d8% a7% d8% aa% d8% b5% d9% 84 -% d8% a8% d9% 86% d8% a7
I want to convert:
اتصل بنا
That's not a UTF-8 problem. You should use urldecode() to decode the string to your (Arabian?) characters. For example:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
echo urldecode("%D8%A7%D8%AA%D8%B5%D9%84+%D8%A8%D9%86%D8%A7");
?>
Originally posted on 2009-06-29 16:23:41
Guest *charlesss* @ 2009-07-05 20:12:22 originally posted:
Love the blog mate, keep up the good work - I'll definitely recommend your blog to some friends of mine ^^
Guest *Saevar* @ 2009-07-17 18:16:09 originally posted:
Thank you :D but i have 1 question, i have sql file that was using iso-8859-1 for 2 years and then the user change the code to utf-8, will this repair and convert iso-8859-1 to utf8 ?
Guest *Derek* @ 2009-09-06 16:07:07 originally posted:
Worked perfectly. You just saved me a lot of time! Thanks so much!
Derek
Guest *meandi* @ 2009-10-07 13:20:55 originally posted:
thank you very much for the plugin!
Guest *Andrew* @ 2009-11-15 10:31:36 originally posted:
Thank you so much for this plugin. I just applied it to my installation, and it worked perfectly with no troubles.
Guest *WS* @ 2010-01-22 06:16:55 originally posted:
Dude, you rock! I've been trying to convert my db, which was a mess of latin and utf8. I found the previous WP plug-in and it butchered my posts, clipping them after any non-latin character (I write in English, but use em-dashes like their going out of style).
Your plugin worked without a hitch! You have no idea how grateful I am! Thanks again for fixing the previous version :)
Glad that it helps.
By the way, your web design looks really beautiful!
Originally posted on 2010-01-22 07:19:13
Guest *WS* @ 2010-01-22 07:22:02 originally posted:
Yep. It helped a ton dude!
And thanks for the compliment, and the lovely plugin :)
Guest *GrgoljBlaster* @ 2010-05-06 23:53:28 originally posted:
Thank you! Plugin works great, and I can finally use UTF8 on my website
Guest *Ben* @ 2010-05-26 16:06:32 originally posted:
Thanks for the great plugin. I'm getting an error. Do you have any idea what this means?
wp_bdprss_items changed to UTF-8 successfully.
---- item_feed_url changed to UTF-8 successfully.
SQL Error:
Specified key was too long; max key length is 1000 bytes
Sorry, I have no idea...
Originally posted on 2010-05-28 13:26:18
Guest *anthony* @ 2010-07-06 21:07:26 originally posted:
I first noticed a character set encoding problem ( see "Victim?s parents to speak on bullycase" here: http://carmel-indiana.us/page/6/ ). What was supposed to be an apostrophe was displaying as a question mark instead. I installed and activated the plugin. It indicated that it had fixed the encoding. But I don't see that the post has been changed. Is the plugin supposed to fix posts that were posted prior to installation of the plugin?
Guest *Joan Piedra* @ 2010-10-19 05:43:36 originally posted:
You sir, are a lifesaver. Thank you very much for this plugin.
Guest *Laura* @ 2010-11-23 08:47:41 originally posted:
When I ran the plug-in I got the following:
wp_posts changed to UTF-8 successfully.
SQL Error:
Column 'post_content' cannot be part of FULLTEXT index
Any clue as to what I can do about the error and get rid of the charset issue?
Thanks much
Sorry, I have no idea. You may google and see if there is any luck, e.g. stackoverflow
Originally posted on 2010-11-23 09:43:06
Guest *peter* @ 2011-01-14 14:01:22 originally posted:
hello!
i made an upgrade from 2.0.7 to 3.1 but i have problems it will not work
http://www.apfel.at/tagesgedanken1/?p=1259
from december on i copy the new articel new into it, so from
http://www.apfel.at/tagesgedanken1/?p=1
to
http://www.apfel.at/tagesgedanken1/?p=2222
the article have the problem, befor it was iso-8859-1
could you help?
thank you
regards
peter
Guest *peter* @ 2011-01-15 03:37:38 originally posted:
hello!
thank you for your wonderfull work of the plugin
i tested it but in my case it will not work
from http://www.apfel.at/tagesgedanken1/?p=2224 to the last
http://www.apfel.at/tagesgedanken1/?p=2269 is ok
i put it after upgrade from 2.0.7 into 3.1 into
befor the old one i have iso-8859-1 so i did the upgrade with your plugin
from http://www.apfel.at/tagesgedanken1/?p=1
to
http://www.apfel.at/tagesgedanken1/?p=2222
but it will not change, what should i do?
regards
peter
Sorry but I don't think my plugin can be of help in your case, because your original database was not encoded in UTF-8. This plugin does not translate the encoding (say, between ISO-8859-1 and UTF-8) -- it just tells the database that the ``correct'' encoding should be UTF-8. In other words, it does not modify the data in your database.
Originally posted on 2011-01-17 02:01:07
Guest *peter* @ 2011-01-17 02:03:57 originally posted:
thank you very much,
In other words, it does not modify the data in your database
to you know how i could modify the database?
regards
peter
This is a painful problem for me, and I'm not good at the encoding problems at MySQL level. Maybe the manual page could help: http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html
To avoid such problems, I just use UTF-8 for everything.
I have a better solution, which might save you a little bit time. If you have a backup of your original database or website, you can export your blog posts in Wordpress into an XML file; then you can use some text editors to convert the encoding to UTF-8 (this is much easier than manipulating MySQL if you are unfamiliar with MySQL); in the end you can import the UTF8-encoded XML file into your Wordpress.
Originally posted on 2011-01-17 02:20:34
Guest *peter* @ 2011-01-18 16:10:03 originally posted:
hi!!
i go back to 2.0.7 activate the plugin but it did not work the error
SQL Error:
You have an error in your SQL syntax near 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1
what could i do to get it work if could give an an login if you want to help me
thank you
:)
peter
As I said, this plugin does not help you really convert the encoding of the data -- it only tells the MySQL database about the real encoding. You need to use other approaches to complete the encoding conversion (the possible one has been given above).
Originally posted on 2011-01-19 03:48:22
Guest *Vlad* @ 2011-10-14 15:47:39 originally posted:
Hello,
I have made one fix to your excellent plugin. On line 132, replace
$sql4 = "ALTER TABLE $table CHANGE $field_name $field_name $field_type CHARACTER SET utf8 COLLATE utf8_bin";
with
$sql4 = "ALTER TABLE $table CHANGE $field_name $field_name $field_type CHARACTER SET utf8 COLLATE utf8_general_ci";
This is so that when you are manually editing/viewing the field within phpMyAdmin, the text that is stored in the field will be human readable. Without this change, it appears as binary-encoded data, which is very inconvenient to use.
Thanks! I have updated this plugin in the Wordpress repository.
Originally posted on 2011-10-14 23:56:58
Guest *Topup* @ 2013-02-09 09:52:37 originally posted:
very good plugin.. 1 give u 5 star !!!!
i love it !!
Guest *Bindoo* @ 2014-05-03 15:40:48 originally posted:
Hi. Urgent. Looks like running this plugin on my 3.8.1 deleted all the content inside Pages. The Posts are fine, but Pages are now empty. Please help! What to do?
Sign in to join the discussion
Sign in with GitHub