Guezt
01-25-2010, 04:20 AM
i've got a site with the following
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
when i view the site on my localhost apache server all is well, but when i move it to my webspace on a different apache server (the settings of which i have no control over) i get trouble
safari, ie and chrome show the page fine, but firefox and opera get the encoding wrong (both have messed up umlauts and firefox shows the utf-8 bom as in the upper left corner of the page)
in firefox' page info it says Encoding: ISO-8859-1, altho' it also recognizes the meta/content type as text/html; charset=UTF-8
i've set the actual encoding of the file(s) in notepad++ to utf-8
any idea how i could force the client browser to treat the site as utf-8?
*edit* putting the following at the beginning of the file seems to have fixed the problem:
<?php header("Content-type: text/html; charset=UTF-8"); ?>
still, i'd like to know why the problem existed in the first place?
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
when i view the site on my localhost apache server all is well, but when i move it to my webspace on a different apache server (the settings of which i have no control over) i get trouble
safari, ie and chrome show the page fine, but firefox and opera get the encoding wrong (both have messed up umlauts and firefox shows the utf-8 bom as in the upper left corner of the page)
in firefox' page info it says Encoding: ISO-8859-1, altho' it also recognizes the meta/content type as text/html; charset=UTF-8
i've set the actual encoding of the file(s) in notepad++ to utf-8
any idea how i could force the client browser to treat the site as utf-8?
*edit* putting the following at the beginning of the file seems to have fixed the problem:
<?php header("Content-type: text/html; charset=UTF-8"); ?>
still, i'd like to know why the problem existed in the first place?