The MU forums have moved to WordPress.org

Restore Unicode Chars? (19 posts)

  1. amnesiak
    Member
    Posted 16 years ago #

    Hey there all, after updating from .2.4 to .3 some of my Japanese users have had issues with their blogs.

    You know how they make those strange unicode faces right? well they now show up as something like

    (*´・∀・`*)♬♬

    Rather than what it's supposed to look. How can I fix this?

  2. amnesiak
    Member
    Posted 16 years ago #

    nobody out there?

  3. theapparatus
    Member
    Posted 16 years ago #

    Bumping within a short time period is normally considered rude. Please don't do it.

    What charset is your database tables currently? What was it before the upgrade?

  4. amnesiak
    Member
    Posted 16 years ago #

    @Theapparatus, I also consider it a bit rude that I'm not known by you on the forums despite all my help to people for over a year and a half now. :P However you seem to be a helper so I'll let it slide (I'm just joking in case my humour is not recognized; got to be safe these days)

    It was basically Japanese chars, I'd assume Shift_JIS

    I have no idea what database tables are currently being used, but I have made no modifaction of them, unless the upgrade would have done that.

  5. andrea_r
    Moderator
    Posted 16 years ago #

    The download was latin encoding for a while and finally got fixed to utf-8. That's bound to mess some things up.

  6. amnesiak
    Member
    Posted 16 years ago #

    any suggestion on what to do to fix her blog andrea? (sorry was on Christmas vacation)

    Happy new year !

  7. moorezilla
    Member
    Posted 16 years ago #

    Ok... I ran into this problem as well and I fixed it this way. WARNING: it's not an elegant solution, and there might be a better way.

    I dumped my entire database to an sql text file. I created a new database and made sure that it was utf-8 for text and collation. I then opened the sql text file in notepad++ and ran a series of search and replaces for characters that were not represented correctly. In my case, this was only about 8 characters. I then saved the file as utf-8 encoding and uploaded it to my server. Then I ran the sql on the new mysql database and all was fixed.

    Again... it's not an elegant solution, so if anyone has a better idea, I'm all ears... err... eyes.

  8. amnesiak
    Member
    Posted 16 years ago #

    so just to get this straight, I'd just need to download my whole database as a .sql file
    then make a new database (I guess through the mysql panel)
    Open up the .sql file I downloaded, then copy it into the new database?

    I didn't understand clearly (I'm not that well versed), and I didn't understand what I needed to replace.

    Did you mean I had to fix every single issue on the blog?

    My Japanese users post tons of those faces, so... does it mean I have to actually replace the 'faces' with what they're supposed to look like?

    If it was easy to change the utf-8 encoding to something else, isn't there a process to revert it?

  9. amnesiak
    Member
    Posted 16 years ago #

    this isn't a bump :P

    I forgot to add that if I write anything on the blog now such as

    ( ̄▽ ̄)ノ_彡☆バンバン!!

    It comes up as ???????????

  10. amnesiak
    Member
    Posted 16 years ago #

    *begs for help*

  11. djsteve
    Member
    Posted 16 years ago #

    Not sure there is any real help for this issue. It has been known and posted about for months ( http://mu.wordpress.org/forums/topic.php?id=6737&page )

    I can only bassume/b that once the upgrade is installed and the upgrade script runs through the database that you are screwed unless you pull your backup and go back to the original and start over. Having an active MU makes this choice a tough one.

    I've decided to just leave it screwed up and chalk it up to free software, what can ya do.

    My biggest concern is that there could be better documentation for the upgrade describing ways to avoid this, and bhopefully/b it won't be an issue in the future. Although i have heard rumors that php and sql updates could cause other issues - not sure about that either.

  12. amnesiak
    Member
    Posted 16 years ago #

    @dj, I do have a backup and considered it, however it's 3 days prior to the update and don't think people would appreciate losing their posts.

    I did manage to get the complete character support by going through over 600 blog tables and changing the coalation from latin_swedish, to utf8-unicode

    Now the Japanese users can type anything new in peice but sadly all their old smilies

    are now

    †â˜†â˜†

    Trying hard to see if there is some sort of program or site which can use the characters to 'assume' what they were. I mean if it thought that a char = â then in theory you could convert it back right?

    You are right though. there really should be better documentation and warnings to let us know of any issues.

  13. lunabyte
    Member
    Posted 16 years ago #

    Have you considered changing your character collation settings in wp-config?

    If there isn't anything defined, it defaults to utf8, and utf8_general_ci.

    Which, if the data in the database isn't that character set, it would pull it out incorrectly.

  14. amnesiak
    Member
    Posted 16 years ago #

    No I didn't change that yet. Wouldn't that defeat the purpose of the whole utf8 change though?

    Would there be a way to just apply it to the relevant blogs?

    If not, what should I add to the wp-config to get the Japanese chars to be visible?

  15. amnesiak
    Member
    Posted 16 years ago #

    sadly it didn't work.

    The characters are all jumbled up. Can anyone think of a way to just get the text back to the way it was?

    Or even convert it so I can copy it to the newly 'changed' blog.

  16. xkiseki
    Member
    Posted 15 years ago #

    Hello,

    I have some Japanese characters in my blog entries and entry titles that were mangled after I did a dump/restore.

    Check out:
    http://www.orthogonalthought.com/blog/index.php/2007/05/mysql-database-migration-and-special-characters/

    I ran the queries in step 1 on the columns "post_content" and "post_title" and my characters were restored.

    Hope it helps.

  17. Konstan
    Member
    Posted 15 years ago #

    Do you have to run both sets of queries? I just tried and ended up with a bigger mess...

    And you cant use varchar(255) on post_content because that column is longtext and it'll get rid of all text past 255 characters :P How'd you do it?

  18. Konstan
    Member
    Posted 15 years ago #

    Ah nevermind...it didnt fix my problem :(

  19. njiang
    Member
    Posted 15 years ago #

    Many thanks to djsteve. The link http://mu.wordpress.org/forums/topic.php?id=6737&page
    has saved me and resolved my problems of "pgrade messed up with content".

About this Topic