piernas Posted May 16, 2015 Share Posted May 16, 2015 I'm writing a script that automatically copies relevant data from old 2.2 database to a new 2.3.4 database. 2.2 database is latin1 and new one is utf8. // Abre dos conexiones a las bases de datos de origen y destino $conn = new mysqli(DESTINATION_SERVER, DESTINATION_USER, DESTINATION_PASS, DESTINATION_DB); // New database $conn2 = new mysqli(SOURCE_SERVER, SOURCE_USER, SOURCE_PASS, SOURCE_DB); // original database How can I convert data from $conn2 (latin1) to $conn (UTF8) when inserting data from $conn2 into $conn? I've tried: $conn->set_charset("latin1"); $conn2->set_charset("utf8"); but it still insert weird characters. Is there a straight way to do this? Link to comment Share on other sites More sharing options...
piernas Posted May 16, 2015 Author Share Posted May 16, 2015 Nevermind, it was my fault. Please ignore/delete this topic. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.