View Full Version : ISO 8859-1 Character set

08-22-2002, 03:49 PM
This may be less of a useful script than just a sort of practice thingie of mine It displays all the characters of the ISO 8859-1 character set, and shows off my parseGetVars() function posted earlier :D It's not by any means perfect, but I just added it to my favorites for a quick reference...save it as "iso.htm" or change the action on the form to match the filename you choose
<title>ISO 8859-1 character set</title>

body, td { font: 12px Verdana; }
th {
font: bold 14px Verdana;
background-color: #999;
color: #FFF;
.col1 {
padding: 3px;
.col2 {
background-color: #FFF;
padding: 3px 10px;
function parseGetVars() {
var getVars = new Array();
var qString = unescape(top.location.search.substring(1));
var pairs = qString.split(/\&/);
for (var i in pairs) {
var nameVal = pairs[i].split(/\=/);
getVars[nameVal[0]] = nameVal[1];
return getVars;

<form action="iso.htm" method="get">
Columns <input type="text" size="4" id="cols" name="cols" />
Lower Bound <input type="text" size="4" id="lb" name="lb" />
Upper Bound <input type="text" size="4" id="ub" name="ub" />
<input type="submit" value="Update" />

var g = parseGetVars();
var numCols = 8;
var lb = 33;
var ub = 255;

if (g['cols']) numCols = parseInt(g['cols']);
if (g['lb']) lb = parseInt(g['lb']);
if (g['ub']) ub = parseInt(g['ub']);

document.write('<table border="0" cellspacing="1" style="background-color: #000; width:200px">');
document.write('<tr><th colspan="'+numCols*2+'">ISO 8859-1 character set</th></tr>');
for (var i=0; i<numCols; i++) {
document.write('<col class="col1"/>');
document.write('<col class="col2" />');

for (var i=lb; i<=ub; i+=numCols) {
for (var count=i; count<i+numCols; count++) {
if (count <= ub) {
var isoChar = '&#'+count+';';

var f = document.forms[0];
f.elements['cols'].value = numCols;
f.elements['lb'].value = lb;
f.elements['ub'].value = ub;

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum