[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] ASCII and HTML (was New User's MacPerl Questions)




>Here's a (really) simple script I use:
>
>print "<HTML><BODY BGCOLOR=FFFFFF><P><FONT SIZE=+3>\n";
>for ($i = 0; $i < 256; $i++)  {
>  print "<BR><FONT COLOR=AAAAAA>$i - </FONT>&#$i;\n";
>  }
>print "</FONT></BODY></HTML>\n";
>
>It just prints out the html code ala - &#0; to &#255;
>view the output in your browser (or run as a cgi!)

This method is dangerous, because fancy browsers like Netscape and
MSIE choose mappings by their whimsy.
(i.e. different versions of different browsers will have differnt mappings)

The best method is, of course, to check the stardard from www.w3.org
by the DTD. (for those who have a pedantic tentency (^_^))

If it is a matter of life and death, even BBEdit's entity table cannot
be relied on.

 Xah, xah@best.com
 http://www.best.com/~xah/PageTwo_dir/more.html
 Department of philosophy
 Bovine University



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch