« Fedora Core 6 Tips and Tricks | Home | Gizmo Call brings VoIP to the browser »

Embperl and %ENV

By Michael Stepanov | January 25, 2007

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,
});

Topics: , , |

 RSS feed for comments on this post.

2 Responses to “Embperl and %ENV”

  1. Robert Says:
    January 28th, 2007 at 10:00 am

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

  2. Michael Stepanov Says:
    January 29th, 2007 at 3:15 pm

    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.

Comments