Binary reading from stdin

Hi
Is there a way opening '-' (not as filename) or STDIN (already open?) ?

I needed that for opening with ...,"r:binary", because
I tried gsub(/x/,'y') (stdin --> stdout), but I get the error "invalid
byte-sequence", also with -E us-ascii
Is there sg like -E binary?
gsub .../n doesnt help.
Whats the best way to open/process binary input (allowing STDIN) ?

Thank you
Berg

You can use STDIN.binmode

ยทยทยท

On 03/04/2016 8:45 AM, "A Berger" <aberger7890@gmail.com> wrote:

Hi
Is there a way opening '-' (not as filename) or STDIN (already open?) ?

I needed that for opening with ...,"r:binary", because
I tried gsub(/x/,'y') (stdin --> stdout), but I get the error "invalid
byte-sequence", also with -E us-ascii
Is there sg like -E binary?
gsub .../n doesnt help.
Whats the best way to open/process binary input (allowing STDIN) ?

Thank you
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;