Announcement

Collapse
No announcement yet.

Apache2 Encoding configuration

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Apache2 Encoding configuration

    Hello,

    I just installed apache2, but I have a configuration problem: Most of my webpages are encoded with the ISO-8859-1 charset, and naturally, in the header section, I have included the meta tag: <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />.

    Unfortunately, this directive is not obeyed by apache2 and the accented characters are not correctly displayed. Apache2 displays the page as if it were encoded with UTF-8

    I have found a way to "solve" the problem: add the
    AddDefaultCharset ISO-8859-1
    in the apache2.conf file.

    If I do that, the files encoded with ISO-8859-1 are displayed correctly, but I also have some files encoded with UTF-8, and these are not displayed correctly if I do that.

    In conclusion, Apache2 is not obeying my charset indication in my webpages. How can I fix that problem?

    Thanks in advance.

    #2
    Re: Apache2 Encoding configuration

    I don't suppose you could encode those files in UTF-8 or use character entities (e.g. &eacute...
    For external use only.

    Comment


      #3
      Re: Apache2 Encoding configuration

      Well, yes I could, but that would require a LOT of work.

      But I think I found the solution: I didn't notice that there was a file in /conf.d named charset that had the AddDefaultCharset UTF-8, and which was included in the apache2.conf file. By suppressing this directive, My meta tag is being obeyed and I can have files with different encoding on the same server.

      I just wonder why the default configuration is made that way...

      Comment

      Working...
      X