Author: poeml Date: 2009-03-28 12:08:42 -0600 (Sat, 28 Mar 2009) New Revision: 6936 Modified: trunk/tools/download-redirector-v2/scanner/scanner.pl Log: scanner: - explicitely tell Perl that the filename is in UTF-8 encoding, before inserting it into the database. Fixes a bug where the scanner aborted when encountering filenames in (valid or invalid) UTF-8 encoding. See https://bugzilla.novell.com/show_bug.cgi?id=490009 Modified: trunk/tools/download-redirector-v2/scanner/scanner.pl =================================================================== --- trunk/tools/download-redirector-v2/scanner/scanner.pl 2009-03-28 11:35:31 UTC (rev 6935) +++ trunk/tools/download-redirector-v2/scanner/scanner.pl 2009-03-28 18:08:42 UTC (rev 6936) _at_@ -101,6 +101,7 @@ use bytes; use Config::IniFiles; use Time::HiRes qw(gettimeofday); +use Encode; my $version = '0.30'; my $scanner_email = 'poeml_at_suse.de'; _at_@ -831,6 +832,8 @@ $path =~ s{^/+}{}; # be sure we have no leading slashes. $path =~ s{//+}{/}g; # avoid double slashes. + # explicitely tell Perl that the filename is in UTF-8 encoding + $path = decode_utf8($path); my $sql = "SELECT mirr_add_bypath(?, ?);"; if (!defined $sth_mirr_addbypath) { _______________________________________________ Opensuse-svn mailing list Opensuse-svn_at_forge.novell.com http://forge.novell.com/mailman/listinfo/opensuse-svn _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Sat Mar 28 2009 - 18:09:39 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT