Force en_US.UTF-8.

This commit is contained in:
stevenpritchard
2006-03-11 18:35:39 +00:00
parent 8d1e43228f
commit ca4c22cf9d
2 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
0.61 2006-03-08
0.61 2006-03-11
* Add this file.
* Add some command-line options:
@@ -12,5 +12,7 @@
* Fix path check to allow for a directory without a trailing /.
(Found in Module::Install 0.59.)
* Force en_US.UTF-8.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185192
# vi: set ai et:
+7 -1
View File
@@ -10,7 +10,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: cpanspec,v 1.10 2006/03/11 18:24:45 stevenpritchard Exp $
# $Id: cpanspec,v 1.11 2006/03/11 18:35:39 stevenpritchard Exp $
my $NAME="cpanspec";
my $VERSION='1.61';
@@ -178,6 +178,7 @@ use FileHandle;
use Archive::Tar;
use Archive::Zip qw(:ERROR_CODES);
use POSIX;
use locale;
use Text::Autoformat;
use YAML qw(Load);
use Module::CoreList;
@@ -346,6 +347,11 @@ sub extract($$$) {
}
}
# Set locale to en_US.UTF8 so that dates in changelog will be correct
# if using another locale. Also ensures writing out UTF8. (Thanks to
# Roy-Magne Mo for pointing out the problem and providing a solution.)
setlocale(LC_ALL, "en_US.UTF-8");
GetOptions(
'help|h' => \$help,
'old|o' => \$compat,