On Thu, Nov 29, 2012 at 5:00 AM, timothy adigun <[email protected]> wrote:
> Hi,
> Please check my comments below:
>
> On Thu, Nov 29, 2012 at 8:55 AM, Charles DeRykus <[email protected]> wrote:
>>
>> On Wed, Nov 28, 2012 at 8:10 PM, boB Stepp <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/