develooper Front page | perl.perl5.porters | Postings from March 2003

Re: Encode vs. $ENV{PERL_UNICODE} [Was: Re: Encode trouble]

Thread Previous
From:
Jarkko Hietaniemi
Date:
March 6, 2003 04:46
Subject:
Re: Encode vs. $ENV{PERL_UNICODE} [Was: Re: Encode trouble]
Message ID:
20030306124509.GA16328@kosh.hut.fi
> >Another problem is that the -C switch does NOT change 
> >$ENV{PERL_UNICODE} so you can't check the state easily.  Can you make 
> >it so that the -C switch changes $ENV{PERL_UNICODE} accordingly?
> 
> Oh, no need.  ${^UNICODE} serves the purpose well enough.

It should because it is the copy of the final "Unicode" setting
achieved through either-or-both $ENV{PERL_UNICODE} and -C :-)

> (defined ${^UNICODE} and ${^UNICODE} != 0)
> 
> should suffice.

Well, yes, if you want to be extrasuperduperhyperparanoid.  But to be
more exact you need to check on the exact contents, which bits are on.

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About