I found this weird behaviour using the mysql server 5.6 command line.
If I do:
source C:\Users\dyesdyes\Downloads\test.sql
and the code in this file is:
insert into `tWord`(`word`,`frequency`) values
('à',16994.68);
The SQL to create the tWord table is:
CREATE TABLE IF NOT EXISTS `tWord` (
`idWord` INT(11) NOT NULL AUTO_INCREMENT,
`word` VARCHAR(45) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL,
`frequency` DOUBLE NULL DEFAULT NULL,
PRIMARY KEY (`idWord`),
UNIQUE INDEX `idWord_UNIQUE` (`idWord` ASC),
INDEX `word` (`word` ASC),
INDEX `idWord` (`idWord` ASC))
ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARACTER SET = utf8;
The error is:
ERROR 1366 (HY000): Incorrect string value: '\xE0' for column 'word' at row 1
If I execute the same insert statement in the workbench client, it works fine. It only gives an error using the command line...
Any hint?