I am trying to save a page which has Unicode Hindi fonts on it. I have tried several from this site and from other, but nothing seems to work.
The error that I am getting is related to wide characters.
here is the code I am using:
use CGI;
use strict;
use warnings;
use LWP::Simple;
use utf8;
use Encode qw(decode);
$url = "http://www.vedakosh.com/rig-veda/mandal-1/sukta-001/mantra-rig-01-001-001";
my $content = get $url or die "Couldn't get $url" unless defined $content;
my $file="1.html";
open FILE, ">:encoding(UTF-8)", "$file";
print FILE $content;
Not sure what I am doing wrong, can someone please help or suggest something?