[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 546
  • Last Modified:

default page encoding

Hi,

This might not be an Apache question but I think it is so bear with me...thanks....

I have some web pages that are encoded with UTF-8.  I have set <meta http-equiv="Content-Type" content="text/html; charset=utf-8" > on the pages, but still the default encoding by the browser is ISO-8859-1, which causes some of the characters to display wrong.  if you manually change the encoding in Firefox or IE to UTF-8 the page reloads and we're all very happy, the characters all display right, etc.  

So how do I get this encoding to default for every browser?!  I'm assuming since I've set the meta tag in the HTML and it's still not working it's an Apache thing.  

Thanks!
 
0
bakum
Asked:
bakum
  • 2
1 Solution
 
periwinkleCommented:
It may *be* an Apache thing.  See:

http://www.w3.org/International/O-HTTP-charset

which states:

For Apache, this can be done via the AddCharset (Apache 1.3.10 and later) or AddType directives, for directories or individual resources (files). With AddDefaultCharset (Apache 1.3.12 and later), it is possible to set the default 'charset' for a whole server.

Unfortunately, it also says:

In theory, any character encoding that has been registered with IANA can be used, but there is no browser that understands all of them. The more widely a character encoding is used, the better the chance that a browser will understand it.

0
 
bakumAuthor Commented:
That was it.  I set up an .htaccess file where those utf-8 files are and set

AddDefaultCharset Off

did the trick.  Turns out that in most circumstances there should be no default charset set for Apache.  That this should be left to the HTML, generally.
0
 
periwinkleCommented:
Glad to have assisted!  Good luck with your site!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now