diff --git a/src/filters/rclimg b/src/filters/rclimg index e6c4bedc..7ad11452 100755 --- a/src/filters/rclimg +++ b/src/filters/rclimg @@ -147,6 +147,9 @@ if ($@) { exit(1); } +binmode(STDIN) || die "cannot binmode STDIN"; +binmode(STDOUT) || die "cannot binmode STDOUT"; + #print STDERR "RCLIMG: Starting\n"; $| = 1; while (1) { diff --git a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp index d7fcce33..3a3b7cbc 100644 --- a/src/internfile/mimehandler.cpp +++ b/src/internfile/mimehandler.cpp @@ -223,12 +223,12 @@ MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs, vector::iterator it = cmdtoks.begin(); #ifdef _WIN32 - // Special-case python on windows: we need to also locate the + // Special-case python and perl on windows: we need to also locate the // first argument which is the script name "python somescript.py". // On Unix, thanks to #!, we just run "somescript.py" - if (!stringlowercmp("python", *it)) { + if (!stringlowercmp("python", *it) || !stringlowercmp("perl", *it)) { if (cmdtoks.size() < 2) { - LOGERR(("mhExecFactory: python line has no script?. [%s]: [%s]\n", + LOGERR(("mhExecFactory: python/perl cmd: no script?. [%s]: [%s]\n", mtype.c_str(), hs.c_str())); } vector::iterator it1(it);