DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Unicode Chart

07.05.2007
| 5348 views |
  • submit to reddit
        This PHP-enhanced HTML page will display the first 4,096 (unless you change it) Unicode characters in a neat table.  Your browser's ability to render the characters properly may vary.
<HTML>
<HEAD>
<TITLE>Unicode Chart</TITLE>
<LINK REL="Stylesheet" TYPE="text/css" HREF="styles.css">
<STYLE TYPE="text/css">
TH {text-align: center; }
TD {text-align: center; }
</STYLE>
</HEAD>
<BODY>
<TABLE ALIGN=CENTER BORDER=1>
<TR><TH> </TH><TH>0</TH><TH>1</TH><TH>2</TH><TH>3</TH><TH>4</TH><TH>5</TH><TH>6</TH><TH>7</TH><TH>8</TH><TH>9</TH><TH>A</TH><TH>B</TH><TH>C</TH><TH>D</TH><TH>E</TH><TH>F</TH></TR>
<?PHP
 for ($i=0; $i<256; $i++) { //DON'T try to generate the whole chart
  printf('<TR><TD>%04X</TD>', $i);
  for ($j=0; $j<16; $j++) {
   printf('<TD>&#x%X%X;</TD>', $i, $j);
  }
  echo "</TR>\n";
 }
?>
</TABLE>
</BODY>
</HTML>