Monday, 17 September 2012

Local UTF-8 Pages Coming Out as Plain Text

In this case the Content-Type header is relevant and you should look for a header that looks like: 

Content-Type: text/html; charset=UTF-8


This: 

<meta charset="UTF-8"> 

locally, is getting the file opened as plain text. Page info gives "text/plain" as Type. 

When I add either: 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 

and in fact just 

<meta http-equiv="Content-Type" charset=utf-8"> 

it looks fine locally. FF Page Info then gives "text/html" as Type. 

I altered the default character encoding in FF and it made no difference unfortunately. 


0 comments:

Post a Comment