-Packages::CGI::init_url( $input, \%params, \%opts );
-
- my $locale = get_locale($opts{lang});
- my $charset = get_charset($opts{lang});
- setlocale ( LC_ALL, $locale )
- or do { debug( "couldn't set locale $locale, using default" ) if DEBUG;
- setlocale( LC_ALL, get_locale() )
- or do {
- debug( "couldn't set default locale either" ) if DEBUG;
- setlocale( LC_ALL, "C" );
- };
- };
- debug( "locale=$locale charset=$charset", 2 ) if DEBUG;
+ Packages::CGI::init_url( $input, \%params, \%opts );
+
+ my $charset = "UTF-8";
+ my $cat = Packages::I18N::Locale->get_handle( $opts{lang} )
+ || Packages::I18N::Locale->get_handle( 'en' );
+ die "get_handle failed for $opts{lang}" unless $cat;
+ $opts{cat} = $cat;