[Resolved] Handling international characters
International (UTF-8) characters get messed up when saving an event.
Thanks for taking the time to post, what exactly are you trying to enter and into which field? If you let me know I can test this out.
There have been issues with this before, but they had been resolved…
thanks for the reply. I’m adding a new event and inserting a title with accented characters. Right after pressing “Update Event” the title gets messed up. The content of “Extra Event Info” stays intact.
It seems that every time I update the event the title gets messed up further.
OK, thanks for the extra info, I’ll look into this.
I’ve tried to recreate this issue and have been unable to do so…
My working theory is that the database character encoding hasn’t been set correctly and is set as latin1 rather than utf-8. There’s a pretty straight forward way to check/fix this.
If any of this makes you uncomfortable or you’re not sure, then PLEASE EMAIL ME before you accidentally take out your whole WordPress install! (email@example.com)
You can check to see what the table is using pretty easily:
* Install the ‘Adminer’ Plugin
* Go to the “settings” menu on the wordpress admin and select adminer
* Open in a new tab
* Find this table in the right-hand column “wp_reallysimpleevents”
* it *should* say beside it in one of the columns ‘utf8_general_ci’
If it doesn’t say ‘uft8’ then you’re going to have to manually change it, but you can do this with adminer. NOTE!!!! I can’t accept any responsibility for any data loss that you might have!!! In saying that, I’ve done this before and didn’t have any problems…
Click “sql command” and execute the following:
ALTER TABLE wp_reallysimpleevents CONVERT TO CHARACTER SET utf8;
That should fix it, if it doesn’t then there is one last command you can try:
alter table wp_reallysimpleevents change title title VARBINARY(255); alter table wp_reallysimpleevents change title title VARCHAR(255) character set utf8;
it’s alrite, i’m pretty familiar with SQL.
I’ve checked and the table and both textual fields are utf8_general_ci.
I have also created an event by SQL, and I think I have found some clue: with perfectly good data in the table, Event Title is displayed scrambled in Edit Event (and only there). So the characters must get messed up when displayed not when saved.
Thanks for the quick feedback muranyia, I can only apologize for the lateness of mine, it’s been a busy old week!!!
Am I right in assuming that the title only screws up in the edit event page? So when you create an entry with SQL it shows up fine in the front end and also in the view events admin page?
Yes, exactly. Of course, when I save the messed up title, it’s saved as it is, messed up.
Hi muranyia, I’ve just published an update to the plugin that should hopefully fix this for you… Because I was unable to recreate this issue, could you let me know if the update works for you?
Thanks for your patience!!!
(plus I got an error “Could not create event! HELP!!” when I tried to change the name of an event and save it, but I cannot reproduce this one)
FYI, this is WP version 3.5.1–hu_HU
Hahaha, and so the saga continues… 🙂
What exactly is the text you’re putting in? I only ask because I’ve managed to get away with all sorts of weird and wonderful characters I never even knew existed! However, I’ll go download that version of wordpress and see what happens.
Ok, so I’ve installed that version of WordPress and have managed to add an event with some example Hungarian text. I was then able edit the title and all seems to be working fine.
I’ve uploaded some screen shots to make sure we’re both on the same page.
Edit and update:
look like this here:
Ah, ok, I’ve just published another update, hopefully you should see it soon. Here’s hoping that this fixes it…
- The topic ‘[Resolved] Handling international characters’ is closed to new replies.