Daisuke Maki


Encode::StdIO - Setup STDIN/STDOUT/STDERR With Proper Encodings


  use Encode::StdIO;
  # Use Term::Encoding to figure out the encoding

  use Encode::StdIO encoding => 'sjis';
  # Now perl octets sent to STDOUT/STDERR automatically gets encoded to sjis


Encode::StdIO automatically sets up your STDIN/STDOUT/STDERR with whatever encoding you're using.

You can specify explicitly what encoding you want to setup:

  use Encode::StdIO encoding => 'sjis';

or you can let Term::Encoding figure out what you are using:

  use Encode::StdIO;

If Term::Encoding fails to find the encoding, then utf-8 is assumed.


Copyright (c) 2008 Daisuke Maki daisuke@endeworks.jp


This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

Hosting generously
sponsored by Bytemark