![]() |
![]() |
|||||||||||||||||||||
|
||||||||||||||||||||||
Registered, copyright, trademark, accented letters, dash, and other non-keyboard characters and symbols require special HTML codes. This article tells you how to make your own chart -- a web page always available on your hard drive that generates your chart on demand. NOTE: If you are reading this article in an HTML-enabled email program, the HTML code and JavaScript may not appear or may appear as incomplete. The demonstration page at http://willmaster.com/a/6/pl.pl?sccg has the actual code available for you to download. There are a few alternate codes for often used non-keyboard characters like the copyright symbol and the quote. However, this article is about the entire visible character set. There are 93 standard visible characters -- those represented on your keyboard. In addition to those standard characters, there are up to 128 other characters accessible by typing: &#_____; where the underscore is replaced with a special number representing the desired special character. As examples, the "R" in a circle "registered" symbol is ® and the 3-dot ellipsis symbol is … The non-keyboard characters are not standardized like keyboard characters are. Different platform/font combinations display a slightly different set. Most of the ownership marks (like "registered" and "trademark" symbols) and most of the accented alphabetical characters are consistent between platforms and popular fonts. There can be some difference between browsers, too. Over 90% of the visible characters between Windows and Macintosh platforms and the courier font are compatible. Here is the list of incompatible special character codes between Windows/Netscape and Macintosh/Netscape:
The above is for computers set for US English. Other languages will probably have their own unique sets of special characters. Incompatible characters generally display as a question mark, a rectangle, or a space. If the browser has not been programmed to recognize a specific code, the code itself may be printed. IE seems to be more consistent between platforms than is Netscape. When you need such a character, it can be right handy to simply look it up and use it. But because of the incompatibility potential of these special characters between platforms, fonts, and human languages, you may wish to use them sparingly. To see what is available to you, go to the demo page at http://willmaster.com/a/6/pl.pl?sccg To make your own web page for displaying the special character's codes, save the below 14 lines on your hard drive as a .htm or .html file:
<html>
<body>
<script type="text/javascript" language="JavaScript">
<!--
document.write('<font size="+2" face="courier">');
for(var i = 33; i < 256; i++) {
document.write('<br>&#' + i);
document.write('; = <b>&#' + i + ';</b>');
}
document.write('</font>');
// -->
</script>
</body>
</html>
Whenever you want to see the list, just drag the file into your browser. It will display the entire visible character set. If you would like a different font size or font face, change the code to your preference. Below the font specification line is a line that begins with: for(var i = 33 That number 33 is the first number of the visible character set. If you would rather not see the representations that you already have on your keyboard, change that number 33 to number 127. On the other hand, if you prefer to see all visible characters except numbers and letters, here is the code for that:
<html>
<body>
<script type="text/javascript" language="JavaScript">
<!--
document.write('<font size="+2" face="courier">');
for(var i = 33; i < 47; i++) {
document.write('<br>&#' + i);
document.write('; = <b>&#' + i + ';</b>');
}
for(var i = 58; i < 64; i++) {
document.write('<br>&#' + i);
document.write('; = <b>&#' + i + ';</b>');
}
for(var i = 91; i < 96; i++) {
document.write('<br>&#' + i);
document.write('; = <b>&#' + i + ';</b>');
}
for(var i = 123; i < 256; i++) {
document.write('<br>&#' + i);
document.write('; = <b>&#' + i + ';</b>');
}
document.write('</font>');
// -->
</script>
</body>
</html>
The above skips over the numbers and letters, and prints the codes for the rest of the visible characters. There you have it, your very own personal special character code generator :) Depending on the purpose of your site, you may want to make the generator available for use by your site visitors -- maybe in a popup like the demonstration page. See http://willmaster.com/a/6/pl.pl?sccg Happy happy! Copyright 2000 William Bontrager
| ||||||||||||||||||||||