The only bit I’m still fuzzy on is that you said for High ASCII characters there’s more than one way to code them; either iso-8859-1 or utf-8.
There are other code pages, too, but these two are the most common ones for the Western European language group (iso-8859-15 if you need the € symbol. Which you probably won’t. I digress.)
The problem is always that, while the basic 7bit remain the same, the 8th bit, which gives us an additional 128 characters, are not the same in all languages. Which makes sense, if you think about it, because Russian obviously needs different 128 characters than Norwegian, or French, or Hungarian. So we need to tell the browser how to interpret these “high” chracters, which character set to choose from. (Unicode is an exception here in that it can basically display all characters from all known languages (pretty much), and is clearly the superior choice.)
I’m trying to encode them utf-8 but the header information is sending iso-8859-1 and overriding it.
Yes. Let me give you a crude example: Imagine a library, if you will, where you pick up a book from the section labeled “French literature”. The book is printed in French all right, but when the librarian hands it to you he says “actually, this one’s in English, sorry about that”. The librarian in this example is your server. If he hadn’t said anything, you would have treated it as French, and been perfectly happy with it. Now that you think it’s English (and have forgotten all your French) you won’t be able to read it, although the book hasn’t changed at all.
So, if iso-8859-1 is actually one of the ways we can encode High ASCII characters, why doesn’t it work on the site?
It would, but you’d actually have to encode your documents as iso-8859-1, not utf-8 as you do. In our example, you’d have to translate the book into English, and put it in the correct section. Then, when you check it out the librarian again tells you it’s in English, only you’re OK with it this time, because it’s what you’ve been expecting.
So, yes, if your server forces Latin-1 on all documents you can solve the issue by actually storing your documents in that format. I don’t recommend it, though, utf-8 is clearly the way to go. Most modern software uses it by default.
I’m trying to encode utf-8 but iso-8859-1 is getting processed thus the weird characters. If I had just used
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
instead of utf-8 from the start, would everything be working fine since it would match up with the server?
Well, the “Content-Type” is only the declaration, or classification if you will. If you put a French book into the “English literature” section, it’s still in French. You’d also have to translate it (= convert characters from utf-8 to iso-8859-1). If you tell EE that iso-8859-1 is what you want to use from now on (= change the language in which your books are being written) future documents and templates will be correct, but existing ones still need to be converted.
Still with me? It’s not rocket science, but still moderately complex. Took me some time to fully grok it, and then only out of necessity 😉