I have a project created in Laravel v10.48.20 and I'm using Laravel Nova v4.34.3 to show records.
I recently added some records with some German characters, and now the Nova resource is throwing this error every time:
Malformed UTF-8 characters, possibly incorrectly encoded
From the start of the project, I've had these settings in my config/database.php
file:
'mysql' => ['driver' => 'mysql', // ...other settings...'charset' => 'utf8mb4','collation' => 'utf8mb4_unicode_ci', // ...other settings...],
These UTF-8 chars shouldn't be causing this issue with the DB settings like this.
I ran this query to check our table to see if any values were incorrectly encoded and no results came up:
SELECT name FROM offers WHERE CHAR_LENGTH(name) != CHAR_LENGTH(CONVERT(name USING utf8mb4));
The PHP settings have default_charset = "UTF-8"
.
This is my Nova field:
Text::make('Name') ->sortable() ->help('The name of the offer.'),
What could be causing this issue?