• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

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

ItemTemplate
Summary Can't replace special chars using GlobalReplacePlugin
ReportedBy TWiki:Main.SteffenPoulsen
Codebase

SVN Range TWiki-4.1, Thu, 09 Nov 2006, build 11947
AppliesTo Extension
Component GlobalReplacePlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins 11995
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2006-12-30 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback