utf2wx_testing.pl 491 Bytes
Newer Older
priyank's avatar
priyank committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/usr/bin/perl

#use Encode;

use strict;

require "lib/IndicCC.pl" or die "IndicCC.pl file not found\n";

#use Memoize;
#memoize('utf2wx');


my $infile = $ARGV[0];
my $lang = $ARGV[1];

open INFILE, $infile or die "failed to open : $infile $!";

while(<INFILE>)
{
        my $line = $_;
        #print "INPUT TEXT:\n", $line, "\n";	
        $line = &utf2wx($line, $lang);
        #print "OUTPUT TEXT:\n", $line, "\n";
	binmode STDOUT, ":utf8";
	print $line;
}