12.12.2005
I've just created a script which converts the encoding of all database entries of wordpress into another encoding.
In most cases you would convert into UTF-8.
IMPORTANT!
Remember to dumpy your database first
mysqldump --opt DB_NAME
Or use phpMyAdmin:
http://www.zerokspot.com/docs/howto.phpmyadmin.backup_and_restore/
http://www.phpmyadmin.net/documentation/#faq6_3
Do NOT run this script more then once
Place this script inside the wp-content folder of your blog and access it via the browser, e.g. http://yoursite.com/blog/wp-content/convert-encoding.php



35
|
Categories > PHP
Tags > English most visited PHP wordpress
next > meine-jugend.net
previous > Mehrsprachige Seiten nicht aus der Datenbank füttern
Into the Woods » De iso-8859-1 a UTF-8
18. Mai 2008 | 15:23
[...] El segundo, utilizando un script que hace que autom
nedzad.eu» Blogarchiv » Mit WordPress umziehen
16. Mai 2008 | 07:37
[...] dem beizukommen, habe ich selbst das Script convert-encoding.php von Markus Tacker eingesetzt, welches im zweiten Durchlauf noch mit dem Wert ‘True’, [...]
Solaris, SAP und Oracle » Blog Archive » Wordpress auf UTF-8 umstellen
1. Mai 2008 | 12:09
[...] ihr keinen Zugriff auf die Shell haben, wäre das hier von M.Tacker.org noch eine interessante Alternative: [...]
10. April 2008 | 07:08
Help me!:
Mode is convert
New encoding is UTF-8
New encoding for mysql is utf8
New collation for mysql is utf8_general_ci
wp_3azkul_commentsFatal error: Call to undefined function mb_convert_encoding() in /home/jardinei/public_html/blog/wp-content/convert-encoding.php on line 121
The mbstring extension needs to be installed to use this script on your host.
See mbstring installation for further instructions.
9. April 2008 | 20:14
Help me!:
Mode is convert
New encoding is UTF-8
New encoding for mysql is utf8
New collation for mysql is utf8_general_ci
wp_3azkul_comments
Fatal error: Call to undefined function mb_convert_encoding() in /home/jardinei/public_html/blog/wp-content/convert-encoding.php on line 121
Der Männerblog » Umlaute im WordPress-Blog umstellen «
25. März 2008 | 16:47
[...] schiebt man die Sache hinaus. Ein Urlaubstag musste jetzt herhalten - und es scheint zu laufen! Ein kleines Script hat die Sache in der Datenbank recht schnell erledigt. Lediglich etliche meiner Widgets gingen [...]
Von Wordpress nach ExpressionEngine, thomas gigold
17. Februar 2008 | 23:16
[...] seit Jahren (noch von Sunlog mitgeschlepptes) ISO-Format in UTF8 gewandelt. Das habe ich mit Hilfe dieses Script bewerkstelligt. Das ändert zwar nicht das Encoding der neuen internen Tags; macht aber nix, [...]
Alles neu macht die Weihnachtszeit » BloggingTom
23. Dezember 2007 | 16:30
[...] alten Datenmüll zu befreien und danach die Datenbankeinträge nach UTF-8 zu konvertieren. Das Script von Markus Tacker war mir dabei eine grosse Hilfe, denn damit geht die Konvertierung fast automatisch vonstatten. [...]
10. Oktober 2007 | 19:21
Mudanças no Blog…
Meus caros,
Percorri a via crucis de modificar o encoding do blog. Agora estamos em formato UTF-8. Tudo graças a um excelente script que converte o formato iso-8859 para UTF-8. O script pode ser baixado aqui.
Também agora estou usando o Qumana para p…
10. Oktober 2007 | 09:05
I think you should update only tables with prefix wp_*. If any tables in the database does not belong to WordPress, they should be left intact. Change the call for our $result :
SHOW TABLES FROM LIKE ‘wp%’ ;
-> g2_MimeTypeMap belongs to gallery2 ![]()
OK, I see the problem. You are using only numeric attributes as keys for update. Unfortunately table g2_MimeTypeMap (at least in WordPress 2.0.2) has only 1 non-numeric column, which is not unique …
Error:
g2_MimeTypeMap Query failed: UPDATE g2_MimeTypeMap SET `g_extension`=’ai’, `g_mimeType`=’application/postscript’, `g_viewable`=’0′ WHERE `g_viewable`=’0′ (Duplicate entry ‘ai’ for key 1)
Hmmm, error is OK - g_viewable is really not table key column, but should be generated
… WHERE `g_extension`=’ai’
Any idea?
8. Oktober 2007 | 08:44
Oculus, I’ve updated the script to show the failing sql query. Please run it again and report the query.
6. Oktober 2007 | 13:34
Hi there!
I’m trying to use your script, but I’m getting the following error:
Mode is convert
New encoding is UTF-8
New encoding for mysql is utf8
New collation for mysql is utf8_general_ci
wp_WP_HASHCASH Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1
Can you give me a clue of why is that happening?
Thanks a lot in advance!
Cheers!
28. September 2007 | 15:11
I just would like to say Thankkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkks a lot!!!!
After tried a bunch of code that made me go crazy during hours, you code is the most simple i found, and it was done in less than one minutes.
Thanks again. ((^_^))
1. August 2007 | 23:58
[...] novinha, tive o problema dos acentos, só que agora eles viraram simples “?”. Rodei um script bacaninha e problema [...]
Convertire il charset di mySql in utf-8 | Web Agency Milano
19. Juli 2007 | 01:12
[...] questo punto della storia interviene zio Google! Cerca di qua, cerca di la… E ti trovo un bell’articolo contenente uno script creato ad hoc per Wordpress ma che, leggermente modificato, si adatta a [...]
11. Juni 2007 | 14:55
@Carol:
Please ask your hosting provider to install the multibyte extension for PHP.
Hi… When i run the script, say mode is convert… but:
“Fatal error: Call to undefined function: mb_convert_encoding() in /home/chthel/public_html/blog/wp-content/convert-encoding.php on line 120″
line 120: a linha 120: $set[] = ek($key) . ‘=’ . ev(mb_convert_encoding($data[$key], $new_encoding));
What this error is? oO
Login Style @ Web » Ainda com problemas no Banco de Dados.
31. Mai 2007 | 10:20
[...] sei, pq honestamente, nunca tinha notado. Quando tudo funciona bem a gente nao se atem ao detalhes. Ja rodei esse script, e nao resolveu o [...]
Login Style @ Web » Wordpress 2.2, um pe no saco!
29. Mai 2007 | 09:28
[...] rodei o tal script que vi a dica no PortalWordpress, mas sem nenhum [...]
… nachbelichtet » Blog Archive » Wordpress von iso-8859-1 auf UTF8 umstellen
22. Mai 2007 | 10:49
[...] ihr keinen Zugriff auf die Shell haben, wäre das hier von M.Tacker.org noch eine interessante Alternative: [...]
5. Mai 2007 | 20:00
You saved a life. Worked like a charm here.
Cheers from Brazil
PB
sorkpappa.se » Blog Archive » Att koppla ihopa det hela.
18. März 2007 | 14:30
[...] att konvertera hela databasen på sorkpappa till UTF-8. Detta ordnades med ett väldigt smidigt script. Fick iof trixa litegranna innan allt blev bra, men bra verkar det då ha [...]
Como converter a codificação de um blog Wordpress at 100nexos
30. Dezember 2006 | 16:13
[...] Markus Tacker oferece um script que converte automaticamente seu banco de dados de iso-8859 para UTF8: Script to convert Wordpress’ content encoding. [...]
geheimwerk.de » Blog Archiv » Encoding-Wirrwarr
9. Dezember 2006 | 14:51
[...] Nach einer kurzen Websuche bin ich auf einen Script zur Konvertierung gestoßen. Der dortige Script ist aber mit äußerster Vorsicht zu genießen und man sollte wirklich unbedingt ein Backup der ganzen MySQL-Datenbank durchführen. Das Script beschränkt sich nämlich nicht auf die Tabellen des aktuellen WordPress-Blogs. Es konvertiert vielmehr alle Tabellen der aktuellen Datenbank. [...]
WP - Script zur Zeichensatzconvertierung - bueltge.de [by:ltge.de]
8. November 2006 | 17:54
[...] Diese Script sollte man sich merken, sicher wird es der eine oder andere noch benötigen. Denn damit läßt sich das Blog ohne Darstellungsprobleme in die gewünschte Konvertierung überführen - Script to convert Wordpress - content encoding . Das es damit Probleme gibt, kann man des öfteren im WordPress-Forum nach lesen. Empfohlen wird auch weiterhin UFT-8, der Zeichensatz, der alle Zeichen beinhaltet. [...]
19. Oktober 2006 | 22:35
Hallo!
Ich wollte das Skript downloaden, habe aber anscheinend nicht die notwendige Berechtigung:
You don’t have permission to access /trac/smallprojects/browser/wordpress/convert-encoding.php on this server.
Dr-Leech’s Blog » Probando Deepest Sender
25. August 2006 | 00:47
[...] Bueno, parece que funciona. Para que funcione correctamente tuve que cambiar el encoding de todo el blog a UTF-8 (algo que quería hacer hace bastante pero nunca me animaba). Lo logré gracias a un script que encontré en los foros de Wordpress. [...]
17. April 2006 | 15:39
Hello,
I’ve tried your script but it seems I am stuck:
with my browser set to iso-8859-1 encoding I get the Spanish characters right. e.g. ñ, ó, ú, í, á (somehow not the é…) but that did not change the general view…
We work on a multilingual blog — the German umlauts still look like this : ö = ö or ü= ü
I also used the $decode = true; option, ran the script again and I flushed the tables in mysql — but to no avail.
Switching my browser to utf-8 encoding I see the German posts ok and the Spanish posts are a mess. Any good pointers?
Thanks,
AC
public void blog() » Endlich UTF-8
22. März 2006 | 12:34
[...] Bei tacker.org gibt es ein convert-encoding Skript dafür, das durch die meisten Tabellen geht und die Sonderzeichen umcodiert. Aber nicht vergessen: Erst ein Backup machen, sonst darf hinterher nicht geweint werden! [...]
Swing tanzen verboten! » Encoding (II)
16. Februar 2006 | 18:36
[...] Ich habe ein nützliches Script gefunden, das ISO-8859-*kodierte Wordpress-Einträge in UTF-8 umwandelt. Hat gut geklappt, aber die Nebenwirkung, dass alle Einträge, die jünger sind als der 9. Februar, defekt sind. Die werde ich per Hand fixen müssen… [...]
2. Februar 2006 | 18:54
WP - Script zur Zeichensatzconvertierung
Diese Script sollte man sich merken, sicher wird es der eine oder andere noch benötigen. Denn damit lä
Convert Wordpress to UTF-8 at codefreak.de
2. Februar 2006 | 09:55
[...] Um bei Wordpress das Encoding von ISO-8859-1 auf UTF-8 umzustellen, ohne mit Darstellungsfehlern leben zu müssen, ist es sehr Hilfreich, das Script to convert Wordpress




