my $xmlEncoding = $1 || 'utf8';

This commit is contained in:
Matthew Wilson 2005-09-16 08:48:14 +00:00
parent 5cf79c8a97
commit 23aae5f0b8
2 changed files with 2 additions and 1 deletions

View file

@ -253,7 +253,7 @@ sub _get_rss_data {
# Convert encoding if needed / Perl 5.8.0 or up required.
if ($] >= 5.008 && $hasEncode) {
$xml =~ /<\?xml.*?encoding=['"](\S+)['"]/i;
my $xmlEncoding = $1;
my $xmlEncoding = $1 || 'utf8';
my $encoding = 'utf8';
if (lc($xmlEncoding) ne lc($encoding)) {
eval { from_to($xml, $xmlEncoding, $encoding) };