Perl-Sensitive Sunglasses | |
PerlMonks |
Re^4: convert files to ansi (8859-1)by Yaerox (Scribe) |
on Mar 29, 2017 at 08:33 UTC ( [id://1186334]=note: print w/replies, xml ) | Need Help?? |
Maybe we talk past each other? My utf8 to iso-8859-1 should do the following: - read file into scalar - eval decode utf8 -- if we get an error, then i simply say it's iso-8859-1 and I don't do anything -- it we get no error, then i use the decoded string On the other script iso-8859-1 to utf8, I wanna go the same way: - read file into scalar - eval decode iso-8859-1 -- if we get an error, then i simply say it's utf8 and I don't do anything -- it we get no error, then i use the decoded string Now I expect we get an eval decode iso-8859-1 error if the input file is utf8, but I don't.
In Section
Seekers of Perl Wisdom
|
|