my $root = ROOT_USER;
print STDERR <<EOT;
Using --guess requires that Encode::Detect be installed. To install
-Encode::Detect, first download it from:
+Encode::Detect, run the following command:
- http://search.cpan.org/dist/Encode-Detect/
-
-Then, unpack it into its own directory and run the following commands
-in that directory, as $root:
-
- ./Build.PL
- ./Build
- ./Build install
+ $^X install-module.pl Encode::Detect
EOT
exit;
while (my @result = $sth->fetchrow_array) {
my $data = shift @result;
- my $digest = md5_base64($data);
+ # Wide characters cause md5_base64() to die.
+ my $digest_data = utf8::is_utf8($data)
+ ? Encode::encode_utf8($data) : $data;
+ my $digest = md5_base64($digest_data);
my @primary_keys = reverse split(',', $pk);
# We copy the array so that we can pop things from it without