QUOTE(Amlord @ Jul 2 2007, 09:49 PM)

What exactly is the error? The reason I ask is because I have very little knowledge of coding, but I do have a crappy little website for my daughter's dance school. I always get weird coding errors where odd symbols (mostly a goofy looking capital A) show up. It isn't related to formatting as far as I can tell.
Here'a a
good tutorial, but it's TLDR and a bit out of date.
The problem is with how computers encode special text characters into binary numbers. When your site gets its special characters mixed up, chances are the character encoding isn't consistent from end-to-end; the Web browser or server was expecting text encoded with one character set, but instead was given text encoded in a slightly different character set.
Mike's having a problem because a JavaScript-generated form or form element isn't honoring his encoding choices due to a bug, but that's not the most common problem... here's how to start fixing the most common sources of character encoding problems:
If you're using a text editor or Dreamweaver to build your pages, you'll need to find out what "character encoding" system it's using: the most common Web standards are
UTF-8 (preferred, more characters) and
ISO-8859-1 (fallback for software that can't handle multibyte characters). Most text editors that cost money will let you pick from a long list of alternatives, while other editors only use the default character set supplied by their proprietary OS (windows-1250 or mac-roman, among others), so this is something you'll have to look up in your software. The
official list of alternatives is very long.
Regardless of what encoding your editor uses, your Web page markup must be set to match your editor. Assuming you're using XHTML-Transitional formatting, there are at least three places you'll need to set your character encoding, illustrated in this sample page wherever you see
"utf-8":
CODE
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Untitled</title>
</head>
<body>
<form accept-charset="utf-8" action="url.cgi" method="get" enctype="application/x-form-urlencoded"id="fn" name="fn">
...
</form>
</body>
</html>
To be clear, some (most?) editing software won't automatically switch to UTF-8 just because your Web page markup is asking it to... if your editor won't let you pick from a menu, then you'll have to replace "utf-8" in the example above with whatever encoding the editor is forcing on you, which is probably the proprietary OS default you'll need to look up. It's a pain in the rear, but
c'st la vie.
You'll also need to be sure your server software (PHP/Perl scripts, MySQL/SQL database, Apache/IIS, etc.) are configured to accept the encoding scheme and generate the right HTTP headers. How to do that can vary greatly, so you'll probably have to look it up in your documentation. You won't usually have trouble if you can use ISO-8859-1 (a.k.a. ISO-Latin-1) or UTF-8 (a.k.a. 8-bit Unicode, no BOM). The HTTP header your server software should generate is:
CODE
Content-Type: text/html; charset=utf-8
where you can replace "utf-8" with the file's actual encoding scheme. If you can't control your HTTP headers, don't worry too much about it; the meta element in the first example should override the HTTP header, anyway.
About the worst thing to do is to leave the encoding completely unspecified. That way, your text editor, server software, and everyone's individual browsers are left to their own devices to make some random guess. They almost always guess wrong.
Beware that if you cut text from some arbitrary document and paste it into your Web page source code or a form element, your text editor or Web browser has to be smart enough to convert the character encoding for you automatically; otherwise, you'll either need to fix problems manually by re-typing the problem characters, or by using separate conversion software (a hassle, I just use editors with conversion features built-in).
If you notice one special character is being replaced with two or more special characters, then you may have a Web form accepting UTF-8, which the server expects to be ISO-8859-1 or some proprietary one-byte-per-character format, so the multibyte characters get misinterpreted as multiple single-byte characters. I've heard this called a Unicode avalanche, because the characters seem to multiply or snowball on multiple trips between client and server. In most simpler sites, there's not really a Unicode avalanche, just an inconsistency in encoding.
Geeky Details: The first 127 characters are usually consistent with ASCII, but the other characters can vary greatly; each OS has at least one proprietary way to do it, and most of them support several alternatives, occasionally for different languages. The three preferred varieties are ISO-8859-1, UTF-16, and UTF-8. The ISO-8859-1 variety uses only one byte per character, so it can theoretically encode up to 256 characters (although it actually reserves a few for special purposes). The UTF-16 variety uses two bytes for every character, so it could theoretically have 65,536 characters, but actually only allows a few thousand so far (and most of us avoid it because it's less efficient for English and other Latin alphabets). UTF-8 strikes a happy medium by using single bytes to encode most latin characters in ISO-8859-1, then by using multiple bytes to encode extended characters from the UTF-16 set. The world is moving to UTF-8, but some older software only supports ISO-8859-1.