The charset for php is utf8. I checked locale on the server. Everything was set to utf8 except for LC_ALL which was empty. I set that to en_US.UTF-8. We shall see if that solves the problem.
Server Information UBB.threads Version 8.0.0 Release 20240826 Server OS Linux Server Load 0.11 Web Server Apache/2.4.37 PHP Version 8.3.11 MYSQL Version 8.0.39 Database Size 1.82 GB