mysql - Using iconv to convert mysqldump-ed databases -


trying convert latin1 mysql db utf8, tried following:

  1. dump db
  2. run iconv -f latin1 -t utf8 on resulting file
  3. import fresh db utf8 default encoding

this mostly works except... some letters converted wrong (an example: uppercase accented 'u' becomes garbled sequence starting question mark). conversion taking place (od query result shows 2 byte sequence latin1 byte was) , te latin1 version alright. while have far been unsystematic in isolating problem (late night; under deadline; etc.) weirdness of issue kills me: why fail on some letters , not all? client connection? column charset? why not getting diagnostics? i'm stymied.

sure, can work on isolating issue , details, thought maybe ran , can recognize (admittedly rather poor) description.

cheers

the data may have been stored latin1 it's possible ever client used dump data has exported utf-8.

open dump file in decent text editor (notepad++, textwrangler, atom) , check encoding allows characters displayed properly.

then when comes import data in, ensure client set use utf-8 on import.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -