[freeside-commits] freeside/FS/FS/cust_main Search.pm,1.10,1.11
Ivan,,,
ivan at wavetail.420.am
Wed Jan 25 21:14:49 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv9593
Modified Files:
Search.pm
Log Message:
fix UTF-8 fuzzy searching
Index: Search.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Search.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- Search.pm 9 Dec 2011 03:20:54 -0000 1.10
+++ Search.pm 26 Jan 2012 05:14:47 -0000 1.11
@@ -880,7 +880,7 @@
flock(LOCK,LOCK_EX)
or die "can't lock $dir/cust_main.$fuzzy: $!";
- open (CACHE,">$dir/cust_main.$fuzzy.tmp")
+ open (CACHE, '>:encoding(UTF-8)', "$dir/cust_main.$fuzzy.tmp")
or die "can't open $dir/cust_main.$fuzzy.tmp: $!";
foreach my $field ( $fuzzy, "ship_$fuzzy" ) {
@@ -920,7 +920,7 @@
if ( $value ) {
- open(CACHE,">>$dir/cust_main.$field")
+ open(CACHE, '>>:encoding(UTF-8)', "$dir/cust_main.$field" )
or die "can't open $dir/cust_main.$field: $!";
flock(CACHE,LOCK_EX)
or die "can't lock $dir/cust_main.$field: $!";
@@ -944,7 +944,7 @@
sub all_X {
my( $self, $field ) = @_;
my $dir = $FS::UID::conf_dir. "/cache.". $FS::UID::datasrc;
- open(CACHE,"<$dir/cust_main.$field")
+ open(CACHE, '<:encoding(UTF-8)', "$dir/cust_main.$field")
or die "can't open $dir/cust_main.$field: $!";
my @array = map { chomp; $_; } <CACHE>;
close CACHE;
More information about the freeside-commits
mailing list