For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > June 2004 > How to disable Unicode?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to disable Unicode?
Hallvard B Furuseth

2004-06-25, 6:49 pm

I have some perl5.6/5.004 scripts that I need to get quickly to work for
perl5.8. Is there an easy way to disable Unicode handling for a whole
script?

I've tried to insert
BEGIN { delete @ENV{qw(LANGUAGE LC_ALL LANG)}; }
use bytes;
but apparently Unicode mode is invoked before the script unsets those
variables. Besides, even if it worked I'd be nervous about not catching
all variables that can cause Unicode mode -- I need to be quite sure
Perl won't turn on Unicode mode because someone set a variable I didn't
know about.

--
Hallvard
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com