Home > Digital Life, Perl Stuff > Embperl and %ENV

Embperl and %ENV

Recently I faced with problem to incorrect displaying none-latin characters on the HTML page generated by Embperl. This happened because Embperl escapes all output symbols by default. To avid it it’s needed to specify a parameter EMBPERL_OUTPUT_ESC_CHARSET = 0. For web application is works fine because Embperl check %ENV and changes its parameters according to it. But if you need to run Embperl script from command line it doesn’t work. The solution is following: add into %ENV desired parameter

$ENV{EMBPERL_OUTPUT_ESC_CHARSET} = 0;

and pass additional parameter to the Embperl::Execute – use_env

Embperl::Execute( { inputfile => my-test-file.epl,
param => [<some data>],
use_env => 1,
});

Categories: Digital Life, Perl Stuff Tags: , ,
  1. January 28th, 2007 at 10:00 | #1

    Hi
    What plugins do you use for code snippets and del.icio.us, digg, etc?

  2. January 29th, 2007 at 15:15 | #2

    Hi Robert,
    I use Sociable. This plugin has a lot sociable sites and it’s easy to add new ones. But I suspect that it’s impossible to install any plugins on wordpress.com.

  1. No trackbacks yet.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes