WordPress.org

Ready to get started?Download WordPress

Forums

change from ISO-8859-15 to UTF-8 (15 posts)

  1. pqs
    Member
    Posted 9 years ago #

    hello,

    when I started my blog, long time ago, i did it usint ISO-8859-15. Now I'd like to change to UTF-8 but if I do it my posts show weird accents (I write in catalan) because they are still in ISO.

    I thought a way to do this would be to create a rss with all posts. Save it into my disc, using gnomes's gEdit change its encoding to UTF-8 and then import all posts again to wp. But before doing all this I would like to know if there is an easier way to make the change.

    Thanks in advance

  2. Well, if you don't have a large amount of posts, you could go back and manually edit each. Ex: Delete the ISO accents and replace them with UTF accents.

  3. pqs
    Member
    Posted 9 years ago #

    No, that's impossible, in catalan we use lots of accents (like in french).

  4. UffeRBA
    Member
    Posted 9 years ago #

    pqs - I just had the same problem, having used ISO-8859-1 for almost a year, typing danish letters (ÆØÅæøå). Here is what I did:

    1. Install WordPress 1.2 One Click Backup - or newer if you use wp1.5
    2. Backup database
    3. Copy/download the database file from server to workstation
    4. Open database file in UltraEdit - other text editors may also work (but Notepad++ didn't)
    5. Use File -> Conversions -> ASCII to UTF-8, to convert your accented letters from ISO-8859-1x to UTF-8
    6. Upload edited database file to server - use a new name, to preserve the original file!!
    7. Restore the edited database
    8. View site - check the RSS 2.0 feed for sanity (my feed had errors, as I had used æ instead of æ in a post title - look for that kind of errors)

    I can't guarantee that it works for you too, so be sure to keep the original database backup!! But it worked fine for me, so I don't see why it shouldn't work for you too.

  5. carthik
    Member
    Posted 9 years ago #

  6. UffeRBA
    Member
    Posted 9 years ago #

    2fargon - your method is much the same, just using command line mysql tools and conversion tools. Too bad you didn't submit your solution here, as I asked for a solution already 8 months ago ;-)

  7. navegante
    Member
    Posted 9 years ago #

    Tried this topic solotion , but UltraEdit didn´t noting, it saved files as dos-8 and the ISO-8859-1 caracters apeared like a mess in the UTF-8 form.
    Is there other windows aplication to try this again?

  8. Finkregh
    Member
    Posted 9 years ago #

    Use File -> Conversions -> ASCII to UTF-8, to convert your accented letters from ISO-8859-1x to UTF-8

    well, in the new Version of UltraEdit it is
    UNICODE/ASCII/UTF-8 to UTF-8 (ASCII editing)

  9. tacker
    Member
    Posted 8 years ago #

    Hoi, I've created a script as I had the same problem:
    http://m.tacker.org/blog/64.script-to-convert-wordpress-content-encoding.html

  10. halsnalle
    Member
    Posted 8 years ago #

    Okay, I'm currently trying to move my blog from Nucleus to WordPress, and have successfully imported everything into WordPress. However, since my Nucleus blog is in Swedish and ISO-8859-1, all exotic accented characters were jumbled.

    Now, I tried using Tacker's script, but it seems it won't work because I've got other tables, not related to WordPress, in the same database. The script chokes on some fatal error on line 72 (but also displays the name of the first table in the database in the browser window).

    So I tried using Ufferba's method instead. It worked fine backing up, took me some time to find Cyclone, a text converter for Mac OS X. Converted (set the options to Standard: ISO > Unicode; Encoding: ISO-8859-1 > Unicode 4.0; Variant: Standard > UTF-8). And then I had to manually restore the tables one by one, since my web host is set to time out. But it worked, eventually -- except that the accented characters still won't display properly.

    And now, it doesn't help to switch the web browser's encoding to ISO-8859-1 to get the correct characters (it just messes them up differently).

    Well, any suggestions? What am I doing wrong?

  11. halsnalle
    Member
    Posted 8 years ago #

    Hm, on another forum, someone claimed that UTF-8 is supported only from MySql 4.1 and up. My web host only runs MySql 3.23.56, which meets the minimum requirement for WordPress, though.

    Could that be the problem? And does it mean I should either settle with ISO-8859-1 or find another host?

  12. pkirk
    Member
    Posted 8 years ago #

    Same prob here... can't switch encoding with any method: chars look always weird :\

  13. tacker
    Member
    Posted 8 years ago #

    You should verify the actual encoding. Check the mysqldump with an UTF-8 aware editor. Make sure that the UTF-8 charactes are not encode themselves resulting in a double encoding.

  14. halsnalle
    Member
    Posted 8 years ago #

    I finally decided to solve this by manually searching-and-replacing all accented characters in Phpmyadmin, using this tip:

    http://lorelle.wordpress.com/2005/12/01/search-and-replace-in-wordpress-mysql-database/

    Took a while (someone who knows more PHP/SQL than me could probably easily write a script). But now most characters are correct in UTF-8, and it obviously works although my host runs an old version of MySql.

  15. Zulan
    Member
    Posted 8 years ago #

    Just wanted to say that it worked for me, used ultraedit and then restored, things that where not crystal clear for me in the beginning where that I had to choose "save as" UTF-8 in ultra edit. Just chooseing the conversion in the file meny did nothing. After the restore of the converted database I got other characters then before, but still not right. But this one was easy, after the restore wordpress changed back to ISO-8859-1, setting it to UFT-8 solved everything.

    Whent from ISO-8859-1 on a Swedish blogg...

    http://www.zulan.se

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags