victor_charlie has asked for the wisdom of the Perl Monks concerning the following question:
I can grab web content with:
use strict; use warnings; use LWP::Simple; my $url = 'http://www.webpage.htm'; my $file = 'myWebpage.html'; my $status = getstore($url, $file); die "Error $status on $url" unless is_success($status); open(IN, "<$file") || die "Can't open $file: $!"; close(IN);
And the iso-8859-1 characters are there if I open that file in a word processor, eg 'ü'. 'ö', 'ß'... are all there. But reading that file back into Perl would give me missing characters when I print to the Terminal. eg �
If I use ...
use open ":encoding(UTF-8)";in my code to open that disc file to work on, the print to Terminal gives me the hex. eg 'H\xF6lzl'
How do I get the umlaut over the Latin-1 characters to print to Terminal?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Parser, file, print to Terminal
by moritz (Cardinal) on Jul 13, 2010 at 13:13 UTC | |
by victor_charlie (Novice) on Jul 13, 2010 at 14:03 UTC | |
by moritz (Cardinal) on Jul 13, 2010 at 14:19 UTC | |
by victor_charlie (Novice) on Jul 13, 2010 at 14:27 UTC | |
by moritz (Cardinal) on Jul 13, 2010 at 14:38 UTC | |
| |
|
Re: HTML::Parser, file, print to Terminal
by Anonymous Monk on Jul 13, 2010 at 13:12 UTC |