Chapter 12.9 in ch12.pdf U2800.pdf http://www.unicode.org/
require("toolbraille.inc"); require("unicode.inc"); function dots( $d ) { $ret = ""; for ($i=1; $i<9; $i++) if (preg_match("/$i/", $d)) $ret .= $i; else $ret .= " "; return $ret; } function blank( $num ) { global $unicodenames; printf("%3d ( ) 0x%02x $unicodenames[$num]\n",$num,$num); } $line = 0; $fd = fopen("../tegn-tabel.txt2","r"); while (!feof($fd)) { $s = fgets($fd, 1024); # 034 0x22 " 0x22 anf|rsel dots 2,3,5,6 if (preg_match("/(\d{3})\s0x[\da-fA-F]{2}\s(.)\s(.{8})\s+dots\s([\d,]+)\s*$/", $s, $match)) { $dots = preg_replace("/,/","", $match[4]); $num = intval($match[1]); $num2 = ord($match[2]); if ($num < 0x20) $num2 = $num; if ($num2 != 0x20 || $num == 0x20) { #if ($line != $num) # while ($line != $num) # blank($line++); $tabda[intval($num2)] = sprintf("%3d (".dots($dots).") 0x%02x $unicodenames[$num2]", $num2, $num2); #printf("%3d (".dots($dots).") $unicodenames[$num2]\n", $num ); $line++; } } } #while ($line < 256) # blank($line++); fclose($fd); reset($tabda); ksort($tabda); $line = 0; while (list($num,$desc) = each($tabda)) { while ($line != $num) blank($line++); print("$desc\n"); $line++; } while ($line < 256) blank($line++); /* for ($i=0; $i<256; $i++) { #printf("0x28%02X, name:\"".pattern($i)." BRAILLE PATTERN ".dotcode($i), $i, $i ); printf("{unum:0x28%02x, name:\"braille pattern ".strtolower(dotcode($i))."\", desc:\"\"},", $i, $i ); print("\n"); } */ ?>