# a ugly snippet i made up for "cleaning" up some texts of dubious
# encoding ( several layers of latin1/latin2/utf-8 and stupid developers)
# no, a simple iconv was not enough

#############################
##### COPY-PASTE WARNING ####
#############################
# there are a few non-ascii characters in the left side, make sure you got them right!
# (read: I can't be bothered to escape them properly) 

my %changes = (
    '&#351;' => 's',
    '&#350;' => 'S',
    '&#355;' => 't',
    '&#354;' => 'T',
    '&#259;' => 'a',
    '&#258;' => 'A',
    '–'    => '-',
    '…'    => '...',
    'î'     => 'i',
    'Î'     => 'I',
    'â'     => 'a',
    'Â'     => 'A',
    '“'    => '"',
    '”'    => '"',
    '„'    => '"',
    '¬' => '',
    '‘’' => '"',
    '’’' => '"',
    '’' => '\'',
    '‘' => '\'',
    ## these two might deserve a <ul>
    '•' => '*',
    "\x95" => '*',
    "a\xA2" => 'a',
    "\xE2" => 'a',
    "\xEE" => 'i',
    "\xCE" => 'i',
    "\x84" => '"',
    "\x85" => '...',
    '½' => '1/2',
    '«' => '"',
    '»' => '"',
);

# these conflict with a few multibyte keys before, we make sure to run them last
my %changes2 = (
    "\x93" => '"',
    "\x94" => '"',
);


## sometime later...
    for ( keys(%changes) ) {
        $text =~ s/$_/$changes{$_}/gs;
    }
    for ( keys(%changes2) ) {
        $text =~ s/$_/$changes2{$_}/gs;
    }

