Invalid utf8 character string + LOAD DATA LOCAL INFILE + MYSQL

0

I'm trying to import an inventory file into CSV and in this files it contains several accents À Á'''' etc etc in the fields Description, Name Vendor. Bank e and the UTF8 fields are in the connection instance as well. so when I import the file I report that General error: 1300 Invalid utf8 character string: 'CAPA PL what is PLASTIC COAT Follow the code below it is correct because I use in another import without stress. Already tried with utf8mb4. Can someone help me?

 $import = "LOAD DATA LOCAL INFILE '$filename' INTO TABLE estoque_sap CHARACTER SET UTF8 FIELDS TERMINATED BY ';' IGNORE 1 LINES ( Material, Descricao, @Estoque, Deposito, TipoDeposito, Posicao, HU, Tipo, Fornecedor, NomeFornecedor, @DataEntrada, Centro) SET Estoque = REPLACE( REPLACE( @Estoque, '.' ,'' ), ',', '.' ), DataEntrada = STR_TO_DATE(@DataEntrada, '%Y-%m-%d')";  
            $stmt = $PDO->prepare($import);
            $stmt->execute(); 
    
asked by anonymous 27.02.2018 / 17:14

1 answer

0

I could only put CHARACTER SET Latin1

    
01.03.2018 / 17:35