Bug #11612 mysqldump --default-character-set default isn't utf8
Submitted: 28 Jun 2005 13:09 Modified: 2 Jan 2006 18:56
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.1.11-log OS:FreeBSD (FreeBSD 4.11-RELEASE-p2)
Assigned to: Alexander Barkov CPU Architecture:Any

[28 Jun 2005 13:09] Olaf van der Spek
Description:
The documentation states:
--default-character-set=charset 

Use charset as the default character set. See Section 5.9.1, “The Character Set Used for Data and Sorting”. If not specified, mysqldump from MySQL 4.1.2 or later uses utf8, and earlier versions use latin1. 

But all three options result in different output, so the default character set is neither latin1 nor utf8.

/usr/local/bin/mysqldump -u root -p tracker vb3_forum
/usr/local/bin/mysqldump --default-character-set=latin1 -u root -p tracker vb3_forum
/usr/local/bin/mysqldump --default-character-set=utf8 -u root -p tracker vb3_forum

INSERT INTO `vb3_forum` VALUES (62,0,'ÃåíéêÜ ôå?íéêÜ æçô?ìáôá','General techical issues about everything',89799,10,2124,1119818945,'dkarakostas','Dialers: Ç êë?
INSERT INTO `vb3_forum` VALUES (62,0,'ÃåíéêÜ ôå÷íéêÜ æçôÞìáôá','General techical issues about everything',89799,10,2124,1119818945,'dkarakostas','Dialers: Ç êëÞ
INSERT INTO `vb3_forum` VALUES (62,0,'ÃåíéêÜ ôå÷íéêÜ æçôÞìáôá','General techical issues about everything',89799,10,2124,1119818945,'dkarako

How to repeat:
/usr/local/bin/mysqldump --default-character-set=utf8
[28 Jun 2005 13:12] Olaf van der Spek
'ÃåíéêÜ ôå?íéêÜ æçô?ìáôá'
'ÃåíéêÜ ôå÷íéêÜ æçôÞìáôá'
'ÃåíéêÜ ôå÷íéêÜ æçôÞìáôá'
[22 Dec 2005 16:27] Aleksey Kishkin
Olaf could you check if problem still persist in the latest mysql?
[25 Dec 2005 17:06] Olaf van der Spek
I've no idea how to properly test whether it's still present.
[26 Dec 2005 15:22] MySQL Verification Team
Could you please verify with latest released version. On my side the default
character set is UTF8:

miguel@hegel:~/dbs/4.1> bin/mysqldump -uroot ut
-- MySQL dump 10.9
--
-- Host: localhost    Database: ut
-- ------------------------------------------------------
-- Server version       4.1.17-debug-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `ut1`
--

DROP TABLE IF EXISTS `ut1`;
CREATE TABLE `ut1` (
  `id` int(11) default NULL,
  `name` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ut1`
--

/*!40000 ALTER TABLE `ut1` DISABLE KEYS */;
LOCK TABLES `ut1` WRITE;
INSERT INTO `ut1` VALUES (1,'çâãÔ');
UNLOCK TABLES;
/*!40000 ALTER TABLE `ut1` ENABLE KEYS */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

miguel@hegel:~/dbs/4.1>
[2 Jan 2006 16:45] Olaf van der Spek
The problem seems to be gone in 5.0.16-Debian_1.
I can't test on FreeBSD but I assume that doesn't matter.
[2 Jan 2006 18:56] MySQL Verification Team
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

Thank you for the feedback.
[12 Feb 2009 10:03] bilal baydur
I not write english...
help mysqldump charecter set latin5 error

mysqldump --default-character-set=latin5   -u ***** -p******* 2010tupsu >C:\tup_su\TupSu2009211172930.txt