On Thu, Nov 29, 2012 at 5:00 AM, timothy adigun <2teezp...@gmail.com> wrote:
> Hi,
> Please check my comments below:
>
> On Thu, Nov 29, 2012 at 8:55 AM, Charles DeRykus <dery...@gmail.com> wrote:
>>
>> On Wed, Nov 28, 2012 at 8:10 PM, boB Stepp <robertvst...@gmail.com> wrote:
>> > As I have mentioned in an earlier posting, I am working my way
>> > (slowly) through Learning Perl, 6th edition. In this edition it uses
>> > UTF-8 throughout. So I have been trying to make this happen in my
>> > Windows 7 Pro 64-bit environment.
>> >
>> > Currently the only way I have been able to display Unicode characters
>> > in the command console is as follows:
>> >
>> > #!/usr/bin/env perl -w
>> > use utf8;
>> >
>> > system "chcp 65001";
>
>  ...
> binmode STDOUT,':encoding(UTF-8)';    ## add this
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hmm,  why is that different?    In 5.14 at least it makes no difference.

    Both:        binmode(STDOUT, ":utf8");
    and:         binmode STDOUT,':encoding(UTF-8)';

suppress the "Wide character..." warning. but neither suppresses
the "Active code page: 65001" output.

You could however do something like this to portably suppress that
output too:


    use File::Spec;
    ...
    my $null = File::Spec->devnull();
    system("chcp 65001 2>$null");



>    even when warnings is turned OFF, you will get the unwanted warning
>

Just a guess because I don't know what chcp is all about...
but it might be  informational rather than an actual warning.

-- 
Charles DeRykus

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to