diff --git a/lib/Vend/CharSet.pm b/lib/Vend/CharSet.pm index 6c72e15..b18b6a0 100644 --- a/lib/Vend/CharSet.pm +++ b/lib/Vend/CharSet.pm @@ -31,12 +31,13 @@ package Vend::CharSet; ); use strict; +no strict qw(subs); use utf8; eval "\$\343\201\257 = 42"; # attempt to automatically load the utf8 libraries. require "utf8_heavy.pl"; unless( $ENV{MINIVEND_DISABLE_UTF8} ) { require Encode; - import Encode qw( decode resolve_alias is_utf8 ); + import Encode qw( decode is_utf8 find_encoding ); } sub decode_urlencode { @@ -73,8 +74,9 @@ sub to_internal { } sub validate_encoding { - my ($encoding) = @_; - return resolve_alias($encoding); + my $encoding = shift; + my $enc = find_encoding($encoding); + return $enc->mime_name; } sub default_charset {