use strict;
use warnings;

sub car2chn($){ #caractère --> chaîne
my( $c ) = @_;

    return ('\x{'.sprintf('%X', ord($c)).'}');

}#car2chn

sub chn2chn($){ #chaîne --> chaîne
my( $chn ) = @_;

	my @tabcar = split(//, $chn);
	my $res = '';
	 foreach my $c ( @tabcar ){
		$res .= car2chn($c)
	}
	return $res;
}#chn2chn

use Encode 'decode_utf8';
$ARGV[0] = decode_utf8($ARGV[0], 1);
print(chn2chn($ARGV[0]));
