Browser charset encoding detection

Dec 31, 2004 14:00 · 90 words · 1 minute read digital

Well. I was faced with the trouble to force a page to be displayed in UTF-8. But although the Content-type meta parameter of the page was - correctly - set to “text/HTML; charset=utf-8”, the browsers (IE & Firefox) wouldn’t use this encoding. Instead, latin1 was used all the time, which was undesireable because of the Euro (€) Symbol.

If you have access to the web server directory you can specify a default encoding within the .htaccess file: Simply add the line AddDefaultCharset utf-8 to .htacces, and everything should work fine.