#!/usr/bin/perl
# a2e -- Version 1.01 97.02.04
# (c) 1997, Hellenic Resources Institute, Inc.
# used as a filter to convert ASCII character not enclosed in <> to
# their ELOT 928 equivalents

@message = <>;
foreach $i ( 0 .. $#message ) {
  $_ = @message[$i];
  s/</\201</g;
  s/>/>\201/g;
  @parts = split(/\201/, $_);
  foreach $part (@parts) {
    if (!($part =~ /^</ || $part =~ />$/)) {
      $_ = $part;
  s/:;i/\337/g;
  s/:;y/\340/g;
  s/;A/\266/g;
  s/;E/\270/g;
  s/;H/\271/g;
  s/;I/\272/g;
  s/;O/\274/g;
  s/;Y/\276/g;
  s/;V/\277/g;
  s/:I/\332/g;
  s/:Y/\333/g;
  s/;a/\334/g;
  s/;e/\335/g;
  s/;h/\336/g;
  s/;i/\337/g;
  s/;o/\374/g;
  s/;y/\375/g;
  s/;v/\376/g;
  s/:i/\372/g;
  s/:y/\373/g;
  tr/ABGDEZHUIKLMNJOPRSTYFXCVabgdezhuiklmnjoprwstyfxcv/\301-\321\323-\331\341-\371/;
  print $_;
    } else { print $part}
  }
}

exit;
