I was able to fix it in the most unexpected way.
I added a line to the file .htaccess:
According to the website where I found the solution, I was supposed to add for
php_value default_charset ISO-8859-1
The server runs 5.6.33, but only the line for PHP 7 worked.