Had a problem trying to replace som "Word-encoded" apostrophes and other chars for some PDFs, seems encoding format changed between Cairo and Dakar.
Index: twikiplugins/GlobalReplacePlugin/lib/TWiki/Plugins/GlobalReplacePlugin.pm
===================================================================
--- twikiplugins/GlobalReplacePlugin/lib/TWiki/Plugins/GlobalReplacePlugin.pm (revision 11994)
+++ twikiplugins/GlobalReplacePlugin/lib/TWiki/Plugins/GlobalReplacePlugin.pm (working copy)
@@ -386,18 +386,31 @@
{
my( $theStr ) = @_;
- # entity decode
+ # entity decode - Cairo: ", Dakar: "
+ $theStr =~ s/\&\#34;/\"/g;
$theStr =~ s/\&\#034;/\"/g;
+ $theStr =~ s/\&\#37;/\%/g;
$theStr =~ s/\&\#037;/\%/g;
+ $theStr =~ s/\&\#38;/\&/g;
+ $theStr =~ s/\&\#038;/\&/g;
+ $theStr =~ s/\&\#39;/\'/g;
+ $theStr =~ s/\&\#039;/\'/g;
+ $theStr =~ s/\&\#42;/\*/g;
$theStr =~ s/\&\#042;/\*/g;
- $theStr =~ s/\&\#095;/\_/g;
+ $theStr =~ s/\&\#60;/\</g;
+ $theStr =~ s/\&\#060;/\</g;
+ $theStr =~ s/\&\#61;/\=/g;
$theStr =~ s/\&\#061;/\=/g;
+ $theStr =~ s/\&\#62;/\>/g;
+ $theStr =~ s/\&\#062;/\>/g;
+ $theStr =~ s/\&\#91;/\[/g;
$theStr =~ s/\&\#091;/\[/g;
+ $theStr =~ s/\&\#93;/\]/g;
$theStr =~ s/\&\#093;/\]/g;
- $theStr =~ s/\&\#060;/\</g;
- $theStr =~ s/\&\#062;/\>/g;
+ $theStr =~ s/\&\#95;/\_/g;
+ $theStr =~ s/\&\#095;/\_/g;
$theStr =~ s/\&\#124;/\|/g;
return $theStr;
}
--
SP
Steffen, please don't use the "Merge To" field for non-core extensions. It's used in generating the release notes, and this plugin is not bundled with the core.
CC
Damn - should have checked. Don't know how I convinced myself it was in the core set, sorry.
--
SP