Ud.t
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 ?>