I have a website that I am trying to get an xml file to parse correctly to an email message. I need to have this xml file in UTF-8 encoding but it appears no matter what I try it still show up as US-ASCII. I am using the http://validator.w3.org to validate and this is the message I get.
Warning: text/* type without a charset parameter seen. Defaulting to US-ASCII per section 3.1 of RFC 3023. http://site.site.com/file.xml
Fatal Error: Input data does not conform to the input encoding. The input encoding was us-ascii. http://site.site.com/file.xml
I create an .htaccess file with this inside but that still doesn’t appear to help.’
AddDefaultCharset utf-8
IndexOptions +Charset=UTF-8
AddCharset utf-8 .html .xml
I have spent well over 4 hours trying to figure out what I need to do in order to get Apache to show this file as UTF-8 and not the ASCII format it appears to be using. What am I missing or what else do I need to do so this virtual host web directory or xml files are seen as UTF-8?
Browsers report as their conclusion that the encoding is UTF-8.
So this seems to work here.
While this mainly is about the meta data about the file (which encoding it is in), please remind that a file containing only US-ASCII characters is as well a valid ASCII file as well as a valid UTF-8 file.
Thanks for this information. It has been ages since I’ve messed with Apache on this level but realized that my .htaccess file wasn’t being read since I had AllowOverride set to None. Silly me!. :sarcastic: