Arclab® Website Analyzer

 

Detect Charset Definition Conflicts in Your Website
Find HTTP Response Header vs. META Charset Conflicts

 

 

Download Trial Version   Purchase

What means "Charset Definition Conflicts"?

In this context, we speak of a "Charset Definition Conflict" when the charset is defined both in the web page itself and in the HTTP response header. It should be noted that the charset definition in the HTTP response header has a higher priority, which means that the META charset definition in the <head> section of the page (on-page) is ignored.

 

Example of a Charset Definition Conflict:

The HTTP response header contains:

Content-Type: text/html; charset=iso-8859-1

This means that in the HTTP response header the character set is specified as "iso-8859-1" (Latin-1).
However, the page itself is UTF-8 encoded and contains a corresponding charset definition in the <head> section of the page:

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

Since the definition in the HTTP response header has a higher priority, iso-8859-1 (Latin-1) would be used instead of utf-8. "utf-8" is a Unicode (or Universal Coded Character Set) character set, while "iso-8859-1" is designed for "Latin-1" characters only. This means that the "utf-8" character set contains characters that cannot be represented with the "iso-8859-1" character set. The result is misrepresentation or unreadable characters.

How can I Detect "Missing Charset Definitions" on My Website?

Finding such conflicts is easy with Arclab® Website Analyzer. First, let the program scan your website.
After the scan of your website is completed, you will receive a detailed report containing all errors found on your website and other information:

 

Website Analyzer Report

 

In the "Charset Definition Conflicts" line, click "Show Details" to display details about the errors:

 

Details: Charset Definition Conflicts

 

  • The report contains the pages or URIs (A) for which a charset definition conflict was found.
  • (B) contains the META charset definition, which is defined in the <head> section of the HTML page.
  • (C) contains the charset definition, which is defined in the HTTP response header (higher priority).

 

To resolve the conflict, you can either remove a definition or correct the corresponding definition if the fonts differ. Of course, this depends on which character set is required. For HTML5 pages, the use of the UTF-8 character set is generally recommended. Using a META definition of the character set in the <head> section of the page is recommended, as without a META charset tag there may be problems when editing the page in some web editors or when you open the (HTML) file directly.

 

There are also cases in which the page or the characters on the page appear to be displayed correctly despite such a conflict. This depends on the respective character sets. However, it is also possible that the characters are displayed correctly in your browser, but not for a user of a different browser or browser language. So you shouldn't ignore such conflicts lightly.