http://www.perlmonks.org?node_id=330093


in reply to Re: Write utf-8 to file?
in thread Write utf-8 to file?

I used
open(PAGE, "<:utf8", "$news"); @HTML = <PAGE>; print escapeHTML(join '', @HTML); close PAGE;
And it doesn't work, @HTML is empty. Maybe just a syntax error but i wouldnt know!

Replies are listed 'Best First'.
Re: Re: Write utf-8 to file?
by borisz (Canon) on Feb 18, 2004 at 23:51 UTC
    Im sure $news is not found or you have no permissions to read the file. try
    open(PAGE, "<:utf8", "$news") or die "OPEN $news failed ($!)";
    and look into your errorlog file.
    Boris