I’m running into a problem with special characters in filenames when deploying on apache and hoping someone has insight into this.
Essentially, I’m reading in filenames from a directory with:
I then evaluate whether reports are available according to a pre-determined list. In this case, it’s the names of hospitals and clinics, each one of which should have a report in the directory.
The problem is that many of the hospitals and clinics have names with special characters (i.e. french accented characters, etc). The filenames are correctly UTF-8 encoded. When evaluating in the development environment everything works fine. However, when deployed to apache, the filenames are pre-escaped when they are read in (so “Centre de Santé K” becomes “Centre de Sant\udcc3\udca9 K”, for example).
I haven’t been able to find anyway to prevent this from happening. I’m aware this is on the apache side but wondering if anyone else has run into this or how to resolve it?
For reference, server environment is ubuntu 20.04;