1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
#!/usr/bin/perl -p
# {OΨӹ cman c餤媩@XuBzvC
#
# @̡GNFF Anthony Fok <foka@debian.org>
# vGGNU General Public License v2 Χs
# next if /^%/;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1u/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1v/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
# ² -> c
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)S/$1d/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(||W))S/$1d/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)(?=@|y)/$1s/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)_/$1ƻs/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)ɺ/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)(?=||)/$1C/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(|o))/$1G/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)_/$1/);
# 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(||||P|b|))_/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)zb/$1b/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(?:|))/$1x/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)E/$1l/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)H/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(?:{|||||))/$1H/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)(?=x|||)/$1H/);
s/ާ@t/@~t/g;
s/奻/¤r/g;
s/rBz/ѳBz/g;
# 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)奻/$1r/);
s/奻(?=Ҧ|s|榡)/r/g;
s/z/ɮz/g;
s/t/ɮרt/g;
s/AȾ/A/g;
s/YY/HY/g;
s/ft/t/g;
s/X~f/X~/g;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)f/$1/);
# hashao "server" s@ "A;" KK
s/A;/A/g;
# Riser "server" s@ "Aȵ{" KK
s/Aȵ{/A/g;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)p/$1q/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1֤/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)A(?=)/$1H/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)r/$1r/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)x/$1I/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)̹/$1ù/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1ƹ/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)}/$1Z/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)p/$1ں/);
#
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)Τ/$1ϥΪ/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)(ʬ|q{)/$1w]/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)n/$1nJ/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)W(?!|r)/$1ɦW/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1ɮ/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)ݮe/$1ۮe/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?){/$1{/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)RO](?!t|A)/$1M/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)RO/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)L/$1C/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)L/$1CL/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)u/$1/);
# 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1䴩/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)/$1ɦW/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)s/$1O/);
s/tm/]w/g;
s/(ĵi|~)H/$1T/g;
s/n](?!|A)/M/g;
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(n|w))/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?(n|w|||Zip~))L/$1/);
1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)(N)?X/$1lX/);
# zh_HK --> zh_TW
# 1 while (s/^((?:[\x00-\x7f]|[\x80-\xff].)*?)Ϻ/$1Ϥ/);
# s/\<t\<(.+?)\>\>/$1/g;
# s/\<s\<\>\>//g;
# s/\<s\<\>\>/ɮ/g;
# s/\<s\<ɮ\>\>/ɮw/g;
# s/\<s\<W\>\>/ɮצW/g;
# s/\<s\<tm\>\>/]w/g;
# s/\<s\<tm\>\>/]w/g;
# s/\<s\<{\>\>/{/g;
# s/Ȥ{/Ȥ{/g;
# s/\<s\<ƾ\>\>//g;
# s/\<s\<H\>\>/T/g;
# s/\<s\<q{\>\>/w]/g;
# s/\<s\<ʬ\>\>/w]/g;
# s/\<s\<\>\>/hD/g;
# s/\<s\<\>\>/Ұ/g;
# s/\<s\<s\>\>/O/g;
# s/\<s\<\>\>/䴩/g;
# s/\<s\<B\>\>//g;
# s/\<s\<]\>\>/M/g;
# s/\<s\<`\>\>//g;
# s/\<s\<u\>\>//g;
s/ϽL/ϺϺ/g;
s/L/ϺϺ/g;
s/ҰʽL/ҰʺϺ/g;
s/ɽL/ҰʺϺ/g;
# And, finally, add an extra backslash where needed.
#s/\G((?:[\x00-\x7f]|[\x80-\xff].)*?[\x80-\xff]\\)/$1\\/g;
#
sub changewww () {
s|^(<HTML lang="zh)">|$1-TW">|;
s/(\.zh)(?=\.(?:gif|jpg|png))/$1-tw/g;
s|^<A href=".*">( \(Big5\))</A>(?= )|$1|;
s/ft/t/g;
s/l(|)C/qH/g;
s/蹳(()?)/Mg$1/g;
s/Hҫ/ҫ/g;
}
|