WordPress.org

Ready to get started?Download WordPress

Forums

moving wp tutorial and text encoding (7 posts)

  1. paperlion
    Member
    Posted 9 years ago #

    Copied the following from the Moving WordPress Tutorial (near the top, steps 2 -3):

    Using WORDPAD or another plaintext editor, open the .sql database file.
    If you use Word, or any sort of word-processor, or certain html editors, you WILL cause errors.

    Is it true that plaintext editors can display accents and other similar formatting? WordPad does show these with the content in my .sql file.

    Elsewhere it was mentioned to use only Save, not Save As. However I wonder if this good advice as room for non-compliance. Apparently my .sql file has encoding differences when restored to its new home with default UTF-8 settings. I don't know what the previous install was set to if not to the WP standard UTF-8 encoding there, but there are many character errors now.

    WordPad has a Unicode format option, but this would be a use of Save As. Also, the Unicode there is UTF-16. Is there a reason the file couldn't be opened in Word as text only, then saved to UTF-8 there?

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    plaintext editors - pspad and notepad++ will.
    And for Save / Save As, with the programs I had at the time, the latter prompted me and would not allow .sql as an option whereas 'save' did the trick.

    Of the guides, that is probably the weakest (though it has stood up to use) and it could do with a redo. The problem is that I will write it in a much more forthright way - You MUST use Notepad++ - for instance which although not strictly needed does reduce the chances for mistakes.

    Using Notepad++ now, and thanks to Chrys in #irc I now have it set to open and save in utf-8 ....... I think I'll have to redo it and make it more detailed. That said, THE most important thing to do is (1) Save your data and (2) COPY the backup and work only from that backup. Everything is then rescuable.

    If I've not started this by week end, yell at me or bump this ? I tend to forget stuff :)

  3. paperlion
    Member
    Posted 9 years ago #

    Podz, thanks for the great info on notepad+++ and pspad, -and all the rest.

    Tried notepad+++ and it showed the dump-file (maybe should be dumb-file) as opening in an ISO encoding. Selected all, changed to UTF-8; then saved.

    phpmyadmin generated significant error messages and couldn't write the tables. This is with a .sql dump file that is running well (except for the formatting typos) in another database on the same server and site.

    Are there lesser and better ways to change encoding?

    Is it just too late to do anything once you're working with a backuped file like this?

    thanks.

  4. paperlion
    Member
    Posted 9 years ago #

    anyone :(

  5. brittanie
    Member
    Posted 8 years ago #

    I'm having this problem as well. I have been able to sucessfully move servers, but now my site has all these character errors, for example, in place of the long dash. I opened my db backup in TextEdit (on a Mac) and have tried Save As (which doesn't allow an .sql extension) and Save, and neither has worked. TextEdit is supposed to be a plain text editor. Since I'm on a Mac, I can't use Notepad. Any suggestions?

  6. vkaryl
    Member
    Posted 8 years ago #

    Try notepad2.... there used to be a mac version. From http://www.flos-freeware.ch

  7. brittanie
    Member
    Posted 8 years ago #

    Thanks for the quick reply. I actually got it to work with TextEdit:

    Open TextEdit before you open your .sql file. In the menu, select preferences, and under plain text file encoding, set it so that it both opens and saves files in UTF-8 (or whatever coding your database tables are in. Mine was UTF-8. You can find this info while you are in mySQL). Then open your .sql file, make the changes, and SAVE � DO NOT SAVE AS.

    It worked like magic.

    I might add that if you are going to be editing your .sql files, always work on a copy, not the original.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.