We’ve been experiencing issues where pages render as garbage sporadically and, during the course of investigating the problem, I found that the original developers of the site never specified a charset OR a doctype.
Now, because most of the site was developed without a doctype and renders in compatability mode in IE by default, adding a doctype is an impossibility at present. However, I did specify that the site should use charset ISO-8859-1 hoping that it might address the problems we’ve had.
Would failing to specify a charset cause these issues and, if so, why?
Not specifying character encoding (charset) means that browsers and search engines will have to guess. The impact varies greatly.
For example, if the content is exclusively Ascii characters, the odds of wrong behavior are very small. However, even then, problems may appear. Suppose that I visit a page that does not declare its encoding and I have to manually try different encodings and end up with selecting UTF-16 (improbable, but possible). When I then visit another page, with just Ascii encoding, that does not declare its encoding, it will be displayed using UTF-16, which means it looks mostly Chinese.
A much more common issue is that if the document contains non-Ascii characters and the browser guesses wrong, you might see various things instead of some characters: small rectangles; small rectangles with hexadecimal digits inside; odd combinations of characters like ä; the symbol ; characters from a different writing system (e.g., Greek or Cyrillic letters where you expect to see Latin letters; or something else.
The character encoding hardly has anything to do with doctype declaration and quirks mode (compatibility), which is more related to styling, dimensions of boxes, placement of boxes, things like that.
What you should declare is the actual encoding used on the pages. You may need to study the authoring tools and the pages themselves to decide what that might be. It’s quite possible that it is ISO-8859-1, but it is increasingly common to have UTF-8 as the default generated by authoring software. You will not see the difference on page that contain Ascii characters only.
If you find out that the encoding is ISO-8859-1, it is still better to declare windows-1252. The reason is that people might actually produce windows-1252 encoded pages, e.g. when copying text from somewhere. The difference between the encodings is that windows-1252 has printable characters (like smart punctuation) in some code positions reserved for control characters in ISO-8859-1 – and those characters (C1 Controls) are disallowed in HTML.