Ud.t

From TORI
Revision as of 03:35, 24 June 2021 by T (talk | contribs) (Created page with "<pre> <?php include "uni.t"; $K=$argc; printf("K=%2d \n",$K); for($k=1; $k<$K; $k++) { $a=$argv[$k]; $b=hexdec($a); $c=unichr($b); $u=uniord($c); printf("\n%s %5d [[&#X%04X;]]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
<?php
include "uni.t";
$K=$argc;
printf("K=%2d \n",$K);
for($k=1; $k<$K; $k++)
{
$a=$argv[$k];
$b=hexdec($a);
$c=unichr($b);
$u=uniord($c);
printf("\n%s %5d [[&#X%04X;]] %s\n",$a,$b,$b, $c);
printf("Unicode character number %05d id est, [[X%04X]]\n",$u,$u);
$d=strlen($c);
echo "Picture: [[$c]] ; uses $d bytes. These bytes are:\n";
for($n=0;$n<$d;$n++) printf("X%2X ",ord($c[$n]));
printf("in the hexadecimal representation and\n");
for($n=0;$n<$d;$n++) printf("%3d ",ord($c[$n]));
printf("in the decimal representation\n");
} //k
?>