Composer update causes "Malformed UTF-8 characters, possibly incorrectly encoded"

Hi everyone, After updating my app using Composer, I’ve encountered an issue when submitting forms. Every time I submit, I receive the following error: “Malformed UTF-8 characters, possibly incorrectly encoded.” I’ve tried several solutions, but nothing seems to resolve the problem. Thank you in advance!
5 Replies
NullPointer
NullPointerOP7d ago
Really no one can help? I really dont know how to debug this.
McClabe
McClabe7d ago
try deleted vendor and composer update again
NullPointer
NullPointerOP7d ago
Thanks for your answer! Tried that out, but problem persists
McClabe
McClabe7d ago
btw this problem impact to all form? i think may be this problem for ur config db 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', try this
NullPointer
NullPointerOP7d ago
Yes impact is to all of my forms. It's already like this
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

Did you find this page helpful?