2002-10-27 13:28:59 +01:00
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
#
|
2006-03-08 19:08:52 +01:00
|
|
|
|
# $Id: sanitize_umlauts,v 1.2 2006-03-08 18:08:52 hjp Exp $
|
2002-10-27 13:28:59 +01:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
use File::Find;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub wanted {
|
|
|
|
|
|
2006-03-08 19:08:52 +01:00
|
|
|
|
if (/[\204\224\201\216\231\232\202]/) {
|
2002-10-27 13:28:59 +01:00
|
|
|
|
my $new = $_;
|
2006-03-08 19:08:52 +01:00
|
|
|
|
$new =~ tr/\204\224\201\216\231\232\202/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/;
|
2002-10-27 13:28:59 +01:00
|
|
|
|
print $File::Find::dir, ": $_ -> $new\n";
|
|
|
|
|
rename $_, $new or die "cannot rename $_ to $new: $!";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (@ARGV == 0) { push (@ARGV, "."); }
|
|
|
|
|
finddepth(\&wanted, @ARGV);
|
|
|
|
|
|
|
|
|
|
print "\n\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# $Log: sanitize_umlauts,v $
|
2006-03-08 19:08:52 +01:00
|
|
|
|
# Revision 1.2 2006-03-08 18:08:52 hjp
|
|
|
|
|
# Removed szlig conversion. Too dangerous as \341 is a valid character in
|
|
|
|
|
# latin-1, too.
|
|
|
|
|
#
|
|
|
|
|
# Revision 1.1 2002/10/27 12:28:59 hjp
|
2002-10-27 13:28:59 +01:00
|
|
|
|
# *** empty log message ***
|
|
|
|
|
#
|