0

In my drupal 8 project, I'm trying to import data of a content type from a csv file, everything is well, but when I'm trying to execute the migration command drush mim my_migration I got the following error:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xAB Nove...' for column 'sourceid1' at row 1 in                   [error]
/Users/brahim/Sites/news8/core/lib/Drupal/Core/Database/Statement.php:59

It seems like a problem of database encoding.. but I don't know what is it really, any idea about the solution?

  • 1
    maybe related to the source file encoding format (try with UTF-8). Check also for string issues (special characters) on the source file. – xaa Sep 13 '18 at 13:14
  • thanks @xaa for replying, how can I change/check the file encoding format? – MiharbKH Sep 13 '18 at 13:18
  • depends of your text editor, google it. eg stackoverflow.com/questions/18693139/… – xaa Sep 13 '18 at 13:22
  • Thank you dude! that was exactly the solution, I changed the file to UTF-8 encoding format and re-execute the migration the content has been imported as it should. thank you! – MiharbKH Sep 13 '18 at 14:02
1

maybe related to the source file encoding format (try with UTF-8). Check also for string issues (special characters) on the source file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.