# HG changeset patch # User wenzelm # Date 1442440115 -7200 # Node ID ff00ad5dc03a1c0bd42ff5f8c44051aca793bd97 # Parent d48da797a056c565ff8b68b55edba35884a932f2 recode all text, which is relevant for Session.save on non-ASCII directory; diff -r d48da797a056 -r ff00ad5dc03a lib/scripts/feeder.pl --- a/lib/scripts/feeder.pl Wed Sep 16 22:09:01 2015 +0200 +++ b/lib/scripts/feeder.pl Wed Sep 16 23:48:35 2015 +0200 @@ -19,14 +19,18 @@ #buffer lines $| = 1; +sub emit { + my ($text) = @_; + if ($text) { + utf8::upgrade($text); + $text =~ s/([\x80-\xff])/\\${\(ord($1))}/g; + print $text, "\n"; + } +} $emitpid && (print $$, "\n"); -if ($head) { - utf8::upgrade($head); - $head =~ s/([\x80-\xff])/\\${\(ord($1))}/g; - print $head, "\n"; -} +emit("$head"); if (!$quit) { while () { @@ -34,7 +38,7 @@ } } -$tail && (print "$tail", "\n"); +emit("$tail"); # wait forever