My Schema is set for Latin1 default collation.
my PHP code:
$result = $conn->sql('CALL _TESTE("á é ô ã ç")');
my _TESTE procedure
CREATE DEFINER=`root`@`%` PROCEDURE `_TESTE`(IN vTarNom VARCHAR(255))
BEGIN
INSERT INTO _TEMP VALUES (NULL, vTarNom);
END
What is beeing inserted:
á é ô ã ç
I want to save exactly what I sent: á é ô ã ç
Any help?
Edited: If I call the procedure from workbench sending "á é ô ã ç", it inserts correctly, just when called by PHP that converts.
You're inserting UTF-8 into a Latin1 database. The quick fix here is to convert your UTF-8 string to Latin1 but the best plan is to make your database UTF-8.
Latin1 might be fine for most languages but it can't handle other symbols that are frequently used by people.