#!/usr/bin/perl -w
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#NAME
#  uctest - UniCode test program
#
#SYNOPSIS
#  uctest [file]..
#
#REQUIRES
#	use utf8;
#
#DESCRIPTION
# This is just a test.
#
#OPTIONS
#
#EXAMPLES
#
#FILES
#
#BUGS
#
#SEE ALSO
#
#AUTHOR
#  John Chambers <jc@trillian.mit.edu>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

$| = 1;
$exitstat = 0;
($P = $0) =~ s".*/"";
$V = $ENV{"V_$P"} || $ENV{"D_$P"} || 3;	# Verbose level.

for $line (<>) {
	++$lines;
	print "LINE$lines: $line" if $V>2;
#	print "### Line is not UTF-8\n" 
#		if $V>1 && !utf8::is_utf8($line);
	while ($line) {
		$line = s/^(.)//;
		$char = $1;
		$code = ord($char);
		$char = '\n' if $char eq "\n";
		printf("%8d %06X $char\n",$code,$code);
	}
}

print "$P: Exit with status $exitstat.\n" if $V>1;
exit $exitstat;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
