#!/usr/bin/perl
# desc{   Replaces Unicode characters with their composed forms.   }
# e.g., turns «ἐὰν ἄριστος ἦ.» to «ἐὰν ἄριστος ᾖ»

use strict; use warnings;
# Time-stamp: "2006-10-12 00:37:23 ADT"
use Unicode::Normalize qw(reorder compose);
die "$0: I take input only from STDIN, not named files.\n"
 if @ARGV;
my $in  =  *STDIN{IO};
my $out = *STDOUT{IO};
binmode($in,  ":utf8");
binmode($out, ":utf8");
while(readline($in)) { print $out compose reorder $_ }
