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


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

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

Published by

Michael Stepanov

Site owner and admin :)

2 thoughts on “Embperl and %ENV”

Leave a Reply

Your email address will not be published. Required fields are marked *