nikolay has asked for the wisdom of the Perl Monks concerning the following question:
Hi.
I get an error of kind "utf8 ... does not map to Unicode at ..." when i'm trying to get files list by qx#find ...# construction, in the case when the files have wrong characters (non-utf8).
I know how to redirect the output to a file and then read the files w/ the wrong encoding, pointed out, so, that i can read all the characters, and even PERL can work in the case (no die w/ an error).
The problem lays in necessity to open those files list by some other programs, ran through system() call, after some logic being done by the script on the files list. -- The PERL logic works perfect on the converted files list, as long as it comes not to the "another program call through system()" -- in which case, of course, the original (not converted) files names are necessary (or the "another program" simply does not recognize it in the FS -- that makes the "work around" profit for PERL to zero!
In other words, the PERL script would work perfectly, unless the PERL itself would not be stupid enough as to inform the user on the "mapping" -- that not user, nor "other programs" called, do not carry for, and terminate the script.
So, as i have to try to accomplish the task in PERL, what are my options regarding the matter?
- Can i straiten PERL by some magical directive as to keep simpler and perform not the tasks it is not been asked for (informing), nor terminate scripts running it (on PERL's much want, but let scripts itself decide what to do w/ the data it processes), regardless PERL poor design?
- Or there is some other trick how PERL developers do in such cases?
Thanks for any advance or idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to make PERL just execute the script until its end?
by Corion (Patriarch) on Oct 16, 2016 at 12:43 UTC | |
by nikolay (Beadle) on Oct 17, 2016 at 06:39 UTC | |
|
Re: How to make PERL just execute the script until its end?
by nikolay (Beadle) on Oct 17, 2016 at 06:37 UTC |