Mit den Datenbankspielereien ist es immer so eine Sache. Mal sind die größten Operationen am offenen Herzen die einfachsten, mal stirbt der Patient schon beim Sehen der Betäubungsspritze.
Manchmal geht es aber auch ganz klassisch. Wenn die Chancen 50/50 stehen, ob die schwierige Operation gelingt, dann sollte man darauf gefasst sein, dass es eben auch schief gehen kann.
So erging es uns heute Abend beim Umstellen der Datenbank auf Unicode mittels diesem Skript.
Damit sollte man wirklich vorsichtig sein. Denn was sich so leicht anhört, kann schon bei ein paar falsch kodierten Zeichen in der Datenbank schwerwiegende Folgen haben. Zum Beispiel könnte es dazu kommen, wie wir es mitmachen durften, dass überhaupt nichts mehr funktioniert und das Umkodieren der Einträge an sich gar nicht stattfindet. Dann findet man entweder einen Wust falsch kodierter Daten vor oder nur dicke Fehlermeldungen.
Glücklicherweise aber gibt es ja Backups. Die helfen einem auch wunderbar und augenblicklich, wenn nicht auch sie falsch kodierte Zeichen enthalten und es schier unmöglich machen, alles in einem Rutsch einzuspielen. So setzt man sich hin und durchsucht alles nach sonderbar aussehenden Zeichen, ersetzt sie und versucht, alles peu à peu wiederherzustellen.
Aber keine Angst, jetzt funktioniert es wieder. Wir haben zwar nicht verbessern können, sondern uns nur Schwierigkeiten eingehandelt, aber was soll’s.
Hiermit also ein dickes Entschuldigung für all die depressiven Schübe, die wir den Millionen von lesehungrigen Besuchern mit unserer kurzzeitigen Abwesenheit bereitet haben.
Die Fahrt kann weiter gehen.




g30rg3_x, 26. Juli 2007
Hi…
I hate when someone on the Internet insults (on a different/unknown language) me or my work, because i never get to understand what he/she writes, even if i use online-translators they have not 100% accurate information, so i get in my head a lot of questions and doubts about what does he/she really want to say…
Thanks for all that insults and bad words to me, really i appreciate all that you say, but first take a break and think by a moment this few words…
“I dont get reward or famous for doing that work…”
Nobody pays me a single buck for doing that and also nobody is pushing me to improve and maintain the script (by the way its a plugin for wordpress, not a single script).
So please next time think about that before write and if you have the enought knowloedge to do it all manually…
why you don’t do it in a very first instance?
really, why not?
And i again thanks for all that words you say, you are the persons that make me everyday think “why should i bother?”, but don’t get rush m still improving and investigating the very best solution to problem, at this time its works for almost everyone, not all because the mysql 4 and 5 incompatibilities and other circumstances that will make my conversion a failure job…
Greetings from mexico and again thanks for all that words i really appreciate all you say and don’t bother to respond this comment i started to understand and ignore persons like you… :)
Jocelyn Blackout, 26. Juli 2007
Hi g30rg3_x,
I hate when someone on the Internet insults me or my work, too. And hopefully I’ll be able to tell you and especially your mood what I really wanted to say with this post.
1. I don’t know why you’re so angry. Are those translating programs so bad? Honestly, they must’ve missed out something.
What I said was that I fucked up my database using the script you provided. At first everything seemed to work, but in the end I saw that the script didn’t do any changes to the wp_post-table. So I tried to find out why and found some weird encoded characters in the wp_post-table of my backups (remember, my backups were allready broken). So I changed all those characters to the right encoding, put everything back online and I had my old configuration again. The trouble now is: where was the problem? I guess it consists of the wrong encoded characters in my wp_posts-table. May be your script tried to change everything and stopped because of these characters. At least that’s what phpmyadmin was doing with the backups and why I had to put them online piece by piece.
2. But I know your doing this for free. So if you now want to get angry again, because I said that I fucked up my db using your script, then listen. Actually I sometimes read the Read-Me-Files. And I read yours. I know that you’re not giving any warranty but having programmed everything in good intentions.
Is that clear now? No, I won’t run right through the whole blogosphere to tell everyone that your script didn’t work for me. And you probably won’t believe me the following: Yesterday, when I had reset everything again, it was late at night and I didn’t want to risk another try at this time. Why didn’t I look for a way to do the job then manually? Because I’m lazy.
May be I should’ve written something about your great work and how I found your link, how I read about other peoples extra-ordinary good experiences with actually no problems at all and everything. Because in the first paragraph I wanted to say, that some months ago I had absolutely no problems with some database optimizing scripts which messed up many other peoples dbs. So there was now just a 50/50 chance.
3. Offending words are allways great to start a conversation, aren’t they? I really hope you reacted this way because of the translation programs. Otherwise I don’t know what will happen if somebody will really insult you or your work sometime. But why should you bother? Hopefully because of the translators …
Greetings …
I’ll send you this comment as an email, too.
Erich, 26. Juli 2007
Hi …
I hate when someone on the Internet, in his lack of manner, loses his temper (in a common language) and insults me or my work, because they had a hard time understanding what i wrote, even if he was using online-translators they have not even 9% accurate information, so i get in my head a lot of questions and doubts about what does he/she really want to say…
Thanks for all that insults and bad words to me, really i appreciate all that you say, but first take a break and think by a moment this few words…
“You should’ve ask me first”
I would pay you a single buck for doing so, but nobody is pushing you to improve and maintain your english grammar.
So please next time think about that before write and if i can be arsed to do it all manually, i would…
why didn’t i do it in a very first instance?
really, why not?
And i again thanks for all that words you say, you are the persons that make me everyday think “German should be the worlds language!”, but don’t get rush m still improving and investigating nothing, at this time its works for me because i’m a lazy bum, not all because of the beer incompatibilities and other circumstances that will make me donk my head on the table.
Greetings from germany and again thanks for all that words i really appreciate all you say and don’t bother to respond this comment i started to understand and ignore persons like you… :)
g30rg3_x, 26. Juli 2007
Hi (again)…
First, thanks for telling me what you really want to say i really (REALLY) appreciate, as i say at very first of my comment i have to many doubts about what you are really trying to say, the online traduction was kind of creepy and after reading your side of the history i get a complete vision about it, it was some words that make all pointing as a failure to me (my work) and i feel that was direct attack to me and also i think that the hole complete post was in a such a sarcasm-way so i respond with the same mood (as you say…).
So after all that m sorry for being such a prick/vain, as you yesterday i was under some job and life problems and i always come and read this type of comments on some sites, normally i wouldn’t bother commenting, i just normally read and try to see what was the problem and what can be a possible solution that can help me to find the very best solution, so again i apologies for all the “mood”.
Going to the problem, what it happens its that bad-coded characters you see was the latin1 characters and as you say that was a common problem for restoring latin1 backups, the solution to that problem was only two ways, import as utf8 under phpmyadmin (and put on the wp-config the right collation and charset you use, that would normally is latin1 and latin1_swedish_ci) or convert the database to utf8, as you can see that was one of the many problems that latin1 can cause and was one of the things for what does wordpress change the default to utf8 rather than latin1.
And finally again accept my apologies, i wouldn’t normally come and leave a comment but this time was something that make really anger, after reading your version all was clever to me.
And Erich, thanks to you as well, and also as you say m not a truly English writer and i don’t even know German, my English is called spanglish, i use the English words with Spanish grammar so its kind of weird :P (also the Americans call this English as mexican-english).
Grettings from mexico and pardon me again
g30rg3_x, 26. Juli 2007
I almost forgot …
The problem of why my plugin doesn’t work its because you use a related posts plugin, this plugin creates and a FULLTEXT index, this index (as many others) make the conversion impossible, this doesn’t allow you to change the text to his binary representations (the safe-step) so when the conversion time comes it will not convert the latin1 characters correctly and you will get a lot of bad coded characters …
Greetings from mexico
Jocelyn Blackout, 26. Juli 2007
Hi g30rg3_x!
No problem about everything. I’m glad you dropped by again.
I think you’re right about the problem. I’ll try the conversion again later. I’ll also take a look at the thing about the releated post plugin. So what I’ll have to do after the conversion is to check the related post index again for bad chars. Actually there I saw the bad chars first after I had used your plugin. May be I just misinterpreted the result I had gotten.
Thanks for the tip.
The curious thing is that I allready had the bad-coded chars in my db. But I guess I got that fixed after replacing them manually.
So thanks again,
J.
Jocelyn Blackout, 27. Juli 2007
Here is an update:
First I kicked the related posts plugin and also replaced the tagging plugin by the simple tagging plugin, which provides both functions and also utf-encoding. Then I converted the database to utf8 again and this time everything seemed to work. Everything but this:
When I change this in wp-config.php:
define(‘DB_CHARSET’, ‘latin1′);
to
define(‘DB_CHARSET’, ‘utf8′);
then everything but the posts is encoded correctly.
When I set it to latin1 again then also the posts are displayed with the correctly encoded chars.
Do you have any idea what I’m doing wrong?
g30rg3_x, 27. Juli 2007
I don’t really get understand what are you saying …
I just understand that no matter what charset you put the data get displayed correctly???
Its that or its in another way…
i prefer to keep this conversation in mails, because here will be difficult to me find sometime to come to this site and put a commentary, with the mails would be more faster and personally..
Greetings from Mexico