Think about Loose Coupling | |
PerlMonks |
re + utf8 problemby maard (Pilgrim) |
on Sep 27, 2004 at 08:29 UTC ( [id://394098]=perlquestion: print w/replies, xml ) | Need Help?? |
maard has asked for the wisdom of the Perl Monks concerning the following question:
Greetings.
My script works well under perl interpreter, but dies when compiled with perl2exe (from Indigo Star). The message is: "Can't locate utf8.pm in @INC ...". The error appears in HTML::Template module at the point where regular expression is applied to template string.
The template string, passed to the module is decoded into perl's internal form with either of commands: When I don't decode (or when I use 2-argument open) there's no error, but output from template is displayed in wrong encoding. Input template can be in one of several encodings, so I want user to decide which encoding to use, rather then force them to use single encoding. That's why I need 3-argument open (or manual decoding). I know that "use utf8" can't help, but I tried to include it in script and recompile the binary... It didn't help. The only info I found about utf8 and regexps was in perlunicode: regexp engine creates 2 versions of compiled regexp - for byte and character strings. It seems to me that perl for some reason tries to convert regexp into internal form (why it needs utf8 module then?), but fails to find it. perl: 5.8.4
Back to
Seekers of Perl Wisdom
|
|