In the Apache config, one can set the following directive to cause the httpd to always send a UTF-8 character encoding header for text/html and text/plain MIME types:
AddDefaultCharset utf-8
I would like to be able to detect in my PHP scripts whether or not this header is being sent, so that I can send the same header using the header()
function if it hasn't been sent.
How can I detect this?