I am unable to make basic encoding work with MySQL and phpMyAdmin. I want to use simple french characters (such as é and è) in my data. If I run an UPDATE, the characters insert correctly. But not when I import the script...
Below is the script I import on phpMyAdmin :
SET NAMES utf8mb4;
CREATE TABLE Proprietaire (
idProprietaire int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
nomProprietaire varchar(255)
)DEFAULT CHARSET=utf8mb4
;
INSERT INTO Proprietaire (nomProprietaire) VALUES
('Léanne'),
('Fabrice'),
('Pedro')
;
The 2 errors I am getting when importing :
Warning: #1300 Invalid utf8mb4 character string: 'E9616E'
Warning: #1366 Incorrect string value: '\xE9anne' for column 'nomProprietaire' at row 1
When importing the script on phpMyAdmin, the only choice close to utf8mb4 is utf8
The table AND the database are also in a similar encoding
But the data is stripped..
What I tried to do
- Add COLLATE utf8mb4_unicode_ci to the colum that needs special characters -> Did nothing
- Modify into DEFAULT CHARSET=utf8 and DEFAULT CHARSET=latin1. Latin1 replaces the accents with ? while utf8 simply cuts the word
- Google 'E9616E', found absolutely nothing??
- ALTER DATABASE mydbname CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -> Did nothing
- Links I checked : How to make MySQL handle UTF-8 properly, Characters appear as question marks using MySQL, MySQL silently replaces UTF chars with literal question marks, Show and change MySQL default character set