Emanuel has asked for the wisdom of the Perl Monks concerning the following question:
--- some stuff above --- $parser->parsefile(shift @ARGV, ProtocolEncoding => "ISO-8859-1"); --- some stuff inbetween --- my $converter = Text::Iconv->new("UTF-8","ISO-8859-1"); while (my($key,$value)=each(%attrs)) { push (@value_stack, { $key=>$value }); if ($program_hash{$current_filmid}{$key} eq '') { $program_hash{$current_filmid}{$key} = $conver +ter->convert($value); } else { if ($key ne "EventId" && $key ne "KanalId") { $program_hash{$current_filmid}{"$key.$ +value"} = $converter->convert($value); } } } --- some stuff below ----
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Parser Encoding (UTF-8 -> ISO-8859-1)
by grantm (Parson) on Sep 12, 2002 at 02:13 UTC | |
by Emanuel (Pilgrim) on Sep 12, 2002 at 02:32 UTC | |
|
Re: XML::Parser Encoding (UTF-8 -> ISO-8859-1)
by jkahn (Friar) on Sep 12, 2002 at 00:49 UTC | |
by Emanuel (Pilgrim) on Sep 12, 2002 at 01:28 UTC | |
|
Re: XML::Parser Encoding (UTF-8 -> ISO-8859-1)
by ash (Monk) on Sep 12, 2002 at 09:20 UTC | |
|
Re: XML::Parser Encoding (UTF-8 -> ISO-8859-1)
by bart (Canon) on Sep 12, 2002 at 20:15 UTC | |
|
Re: XML::Parser Encoding (UTF-8 -> ISO-8859-1)
by Stegalex (Chaplain) on Sep 14, 2002 at 12:26 UTC |