简体   繁体   English

perl中的运行时错误

[英]Run time error in perl

I have made a standalone exe file by packaging a perl file using PAR::Packager. 我通过使用PAR :: Packager打包perl文件制作了一个独立的exe文件。

The file works perfectly in my system, but it throws an error. 该文件在我的系统中运行良好,但它会引发错误。 if i used it in another system which have windows xp as OS. 如果我在另一个以Windows XP作为操作系统的系统中使用它。

The locale codeset (cp936) isn't one that perl can decode,Stopped at Encode/Locale.pm line 94
Compliation failed in require at LWP/UserAgent.pm line 1000

Please give some suggestion.Thanks 请给出一些建议。谢谢

Update : the files i have included in the script is 更新:我在脚本中包含的文件是

use Encode::Byte;
use strict;
use warnings;
use WWW::Mechanize;
use utf8;

You are missing the following line in your code: 您在代码中缺少以下行:

use Encode::CN;

As you can see in Encode::Byte documentation , cp936 it is not included. 正如您在Encode :: Byte文档中看到的那样, cp936不包括在内。 But it is listed in Encode::CN docs . 但它列在Encode :: CN docs中

Adding both packages (Encode::Byte and Encode::CN should solve your problem). 添加两个包(Encode :: Byte和Encode :: CN应该可以解决您的问题)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM