#!/usr/bin/perl -p # ansi2latin - filter text to convert ANSI chars 128-159 to Latin-1 visibles # Steve Kinzler, kinzler@cs.indiana.edu, Jul 05 # http://www.cs.indiana.edu/~kinzler/home.html#unix # see http://www.fingertipsoft.com/3dkbd/ansitable.html # other useful (non-ANSI) filterings s/\240/ /g; # nbsp s/\342''/=/g; # acirc ' ' s/\342\200\231/'/g; # acirc ~@ ~Y s/\200//g; # 128 ~@ UNUSED / euro s/\201/[]/g; # 129 ~A UNUSED s/\202/'/g; # 130 ~B baseline single quote s/\203//g; # 131 ~C florin s/\204/"/g; # 132 ~D baseline double quote s/\205/.../g; # 133 ~E ellipsis s/\206/<*>/g; # 134 ~F dagger (single) s/\207/<*><*>/g; # 135 ~G dagger (double) s/\210/'/g; # 136 ~H circumflex s/\211/<0\/00>/g; # 137 ~I per mil s/\212//g; # 138 ~J S caron s/\213//g; # 142 ~N UNUSED / Z caron s/\217/[]/g; # 143 ~O UNUSED s/\220/[]/g; # 144 ~P UNUSED s/\221/'/g; # 145 ~Q open single quote s/\222/'/g; # 146 ~R close single quote s/\223/"/g; # 147 ~S open double quote s/\224/"/g; # 148 ~T close double quote s/\225/<\267>/g; # 149 ~U bullet (large) s/\226/--/g; # 150 ~V en dash s/\227/---/g; # 151 ~W em dash s/\230/~/g; # 152 ~X tilde s/\231/(TM)/g; # 153 ~Y unregistered trademark s/\232//g; # 154 ~Z s caron s/\233/>/g; # 155 ~[ right single guillemet s/\234/oe/g; # 156 ~\ oe ligature s/\235/[]/g; # 157 ~] UNUSED s/\236//g; # 158 ~^ UNUSED / z caron s/\237//g; # 159 ~_ Y diaeresis