When a migration sql query contains non-ASCII utf8 characters, the migration may fail with the following error:
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xCF\x0A\xCF\x80\xCE\xBF...'
(the exact string may be different but the 2nd or 3rd character typically is 0x0A which is invalide after e.g. 0xCF)
The problem is that splitSql uses two regulare expressions that do not take into account utf8 and may split between bytes of a multibyte sequence. The result is an invalid multibyte utf8 sequence.
The solution is simple, add the /u modifier on each regex.
When a migration sql query contains non-ASCII utf8 characters, the migration may fail with the following error:
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xCF\x0A\xCF\x80\xCE\xBF...'(the exact string may be different but the 2nd or 3rd character typically is 0x0A which is invalide after e.g. 0xCF)
The problem is that splitSql uses two regulare expressions that do not take into account utf8 and may split between bytes of a multibyte sequence. The result is an invalid multibyte utf8 sequence.
The solution is simple, add the /u modifier on each regex.