Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Convert latin1 to UTF-8 in MySQL

Posted on March 15, 2011 - March 15, 2011 by margusja

mysqldump -u root -p –default-character-set=latin1 -c –insert-ignore –skip-set-charset -r dump.sql latin1_dbname
file dump.sql
Non-ISO extended-ASCII HTML document text, with very long lines
iconv -f ISO8859-1 -t UTF-8 dump.sql > dump_utf8.sql
file dump_utf8.sql
UTF-8 Unicode HTML document text, with very long lines
perl -pi -w -e ‘s/CHARSET=latin1/CHARSET=utf8/g;’ dump_utf8.sql
mysqladmin -u user -p –default-character-set=utf8 create utf8_dbname; või mysql käsurealt: CREATE DATABASE `utf8_dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql -u user –max_allowed_packet=16M -p –default-character-set=utf8 utf8dbname < dump_utf8.sql

Posted in Linux

Post navigation

Icecast stress test
iPhone4 4.3.1 how to boot in to tethered mode

Leave a Reply

You must be logged in to post a comment.

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.