in reply to Re^2: Malformed UTF-8 character
in thread Malformed UTF-8 character
The best solution probably it to download notepad++, but it seems like overkill to learn another editor to solve such a rare problem.
As much as it pains me to say it (given my Notepad++ fandom), it does seem like overkill. But iconv.exe comes with my Strawberry perl... and if it does with yours, then it can handle the translation. (Or gnuwin32's iconv). I believe one of the following two would properly translate the CP1252 encoding of the emdash into UTF-8.
iconv -f ISO-8859-1 -t utf-8 savedfile > outfile.pl iconv -f CP1252 -t utf-8 savedfile > outfile.pl
(Of course, the other fix is to not use utf8; after you download the script; perl will default to your native Windows encoding {if I understand things correctly}, so that should work -- at least, it did for me from that same downloaded source code.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Malformed UTF-8 character
by BillKSmith (Monsignor) on Dec 02, 2022 at 16:25 UTC | |
by choroba (Cardinal) on Dec 02, 2022 at 23:22 UTC |
In Section
Seekers of Perl Wisdom