SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    0 Post(s)
    0 Thread(s)

    Converting Latin1 -> UTF8

    So I'm trying to convert this database which was initially setup as Latin-1 (dbms is MySQL 4). The characters being stored were typed in as Cyrillic ( Russian, Windows-1251 ) - when I view the data straight in the db it's just a bunch of gibberish, and these are being output on the frontend as windows-1251 and that's the only encoding which is readable.

    I've tried using iconv which is a unix command to convert the output of my db ( .sql file ) from LATIN1 to UTF8 and it just ends up in even further gibberish. Tried selecting WINDOWS-1251 to UTF8 and it just fails completely.

    Can someone recommend some piece of software I can use for either Windows or *nix? I'm open to anything, even if I have to fully convert or use PostgreSQL or SQLite.
    Cross browser css bugs

    Dan Schulz you will be missed

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2008
    0 Post(s)
    0 Thread(s)
    I had a similar problem (LATIN2 -> UTF8), iconv didn't work correctly.
    In the end I used phpmysql export and import in another mysql. (when you do export/import there are options for selecting encoding).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts