#!/usr/bin/perl -w

# 7bit-utf8.pl
# The input is transformed from internal Latin 1 digraph Sami to utf8.
# $Id$


while (<>) 
{

# This set has to be first, because some of the characters 
# occur in the next set 
# (Ä = \304 etc. to avoid substituting them twise.) 
s/Ã/\303\203/g ;
s/À/\303\200/g ;
s/Á/\303\201/g ;    
s/Â/\303\202/g ;
s/Ä/\303\204/g ;
s/Å/\303\205/g ;
s/Æ/\303\206/g ;
#s/C/\303\207/g ;

s/C1/\304\214/g ;
s/c1/\304\215/g ;
s/D1/\304\220/g ;
s/d1/\304\221/g ;
s/N1/\305\212/g ;
s/n1/\305\213/g ;
s/S1/\305\240/g ;
s/s1/\305\241/g ;
s/T1/\305\246/g ;
s/t1/\305\247/g ;
s/Z1/\305\275/g ;
s/z1/\305\276/g ;

s/È/\303\210/g ;
s/É/\303\211/g ;
s/Ê/\303\212/g ;
s/Ë/\303\213/g ;
s/Ì/\303\214/g ;
s/Í/\303\215/g ;
s/Î/\303\216/g ;
s/Ï/\303\217/g ;

s/Ð/\303\220/g ;
s/Ñ/\303\221/g ;
s/Ò/\303\222/g ;
s/Ó/\303\223/g ;
s/Ô/\303\224/g ;
s/Õ/\303\225/g ;
s/Ö/\303\226/g ;
#s/x/\303\227/g ;

s/Ø/\303\230/g ;
s/Ù/\303\231/g ;
s/Ú/\303\232/g ;
s/Û/\303\233/g ;
s/Ü/\303\234/g ;
s/Ý/\303\235/g ;
s/Þ/\303\236/g ;
s/ß/\303\237/g ;

s/à/\303\240/g ;
s/á/\303\241/g ;
s/â/\303\242/g ;
s/ã/\303\243/g ;
s/ä/\303\244/g ;
s/å/\303\245/g ;
s/æ/\303\246/g ;
#s/c/\303\247/g ;

s/è/\303\250/g ;
s/é/\303\251/g ;
s/ê/\303\252/g ;
s/ë/\303\253/g ;
s/ì/\303\254/g ;
s/í/\303\255/g ;
s/î/\303\256/g ;
s/ï/\303\257/g ;

s/ð/\303\260/g ;
s/ñ/\303\261/g ;
s/ò/\303\262/g ;
s/ó/\303\263/g ;
s/ô/\303\264/g ;
s/õ/\303\265/g ;
s/ö/\303\266/g ;
s/-/\303\267/g ;

s/ø/\303\270/g ;
s/ù/\303\271/g ;
s/ú/\303\272/g ;
s/û/\303\273/g ;
s/ü/\303\274/g ;
s/ý/\303\275/g ;
s/þ/\303\276/g ;
s/ÿ/\303\277/g ;

s/--/â\200\223/g ; # Input is m-dash, I render by two hyphens.
s/\'/â\200\231/g ; # Single quotation marks
s/«/â\200\234/g ;  # These quotation marks had the symbol â
s/»/â\200\235/g ;  # preceeding them in a certain text.

s/«/\200\234/g ;
s/»/\200\235/g ;

print ;
}
