I am making an application and my goal is that from the form you enter the data with accents and ñ, and that in the BD are stored the same.
It turns out that when executing the following query through PHP with PDO (from the backend of the application):
INSERT INTO familia VALUES(0,'áááéééíííóóóúúúñññ','A','','','');
In the DB it is stored as:
áááéééÃÃÃóóóúúúñññ
What should I do to have the chain saved correctly in the database? The script of the table is as follows:
CREATE TABLE 'familia' (
'fam_codigo' bigint(20) unsigned NOT NULL AUTO_INCREMENT,
'fam_descripcion' varchar(100) NOT NULL,
'fam_estado' varchar(1) NOT NULL,
'fam_usureg' varchar(20) NOT NULL,
'fam_fecreg' date NOT NULL,
'fam_horreg' varchar(8) NOT NULL,
UNIQUE KEY 'fam_codigo' ('fam_codigo'),
KEY 'fam_codigo_2' ('fam_codigo'),
KEY 'fam_codigo_3' ('fam_codigo')
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8mb4;