I'm making PHP, configured in default_charset = UTF-8 , put data brought from the MySQL database, also configured with all character variables and collation in UTF-8, within a select element, but it does not correctly encode characters with accents, as seen in this image:
The problem is that everything that PHP prints that has nothing to do with data from MySQL does print correctly encoded. Likewise the data of the base are well kept with their accents and others.
When I use the utf8_encode function, the problem is solved. But we all know how exhausting it is to invoke the function for each variable. And even more so when it's not necessary knowing that Apache Tomcat, PHP, and MariaDB are all configured in UTF-8, so I do not understand.
Thank you very much for your cooperation!