PHP built-in webserver ruins foreign characters

94 Views Asked by At

I recently started using PHP's built-in webserver a lot more.

Unfortunately serving pages through it seems to have an effect on pages that retrieve data from our oracle database containing ÆØÅ.

The first image is when I run the script through Xampps' webserver, the second one is from PHP's built-in server.

from xampp enter image description here

from built-in enter image description here

The unpacked binary value of the 5th key can be seen next to each of the pictures.

Notice how it translates Æ into ã†. This obviously looks like an encoding error, but I'm not entirely sure what to look for. I'm not sure how exactly the built-in server serves pages, but I know the difference between Xampp and PHP is that they are using different PHP binaries and configuration.

Both php.ini files have default_charset="UTF-8" set.

Furthermore, looking at the response headers, both of them states: Content-type: text/html; charset=UTF-8.

Any ideas?

0

There are 0 best solutions below