[Rt-commit] [svn] r1067 - DBIx-SearchBuilder/trunk

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Mon Jun 14 15:29:14 EDT 2004


Author: alexmv
Date: Mon Jun 14 15:29:14 2004
New Revision: 1067

Modified:
   DBIx-SearchBuilder/trunk/Changes
   DBIx-SearchBuilder/trunk/META.yml
   DBIx-SearchBuilder/trunk/SearchBuilder.pm
Log:
RE-Ticket: 5719
RT-Update: correspond
RT-Status: closed

 * Apply a variant of the patch given in 5719, which has a workaround
   for DBD drivers that don't deal properly with UTF8.  This should
   also close tickets 2598, 4229, 5403, and 5600.



Modified: DBIx-SearchBuilder/trunk/Changes
==============================================================================
--- DBIx-SearchBuilder/trunk/Changes	(original)
+++ DBIx-SearchBuilder/trunk/Changes	Mon Jun 14 15:29:14 2004
@@ -1,5 +1,8 @@
 Revision history for Perl extension DBIx::SearchBuilder.
 
+1.00_05 - Force utf8 flag on when doing searches for utf8 data; this
+          is a workaround for DBDs that don't do it themselves.
+
 1.00_04	- Move Postgres specific join behaviour to the superclass so 
 	  everyone gets the benefit.
 

Modified: DBIx-SearchBuilder/trunk/META.yml
==============================================================================
--- DBIx-SearchBuilder/trunk/META.yml	(original)
+++ DBIx-SearchBuilder/trunk/META.yml	Mon Jun 14 15:29:14 2004
@@ -1,5 +1,5 @@
 name: DBIx-SearchBuilder
-version: 1.00_03
+version: 1.00_05
 license: perl
 distribution_type: module
 build_requires:

Modified: DBIx-SearchBuilder/trunk/SearchBuilder.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder.pm	(original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder.pm	Mon Jun 14 15:29:14 2004
@@ -5,7 +5,7 @@
 use strict;
 use vars qw($VERSION);
 
-$VERSION = "1.00_04";
+$VERSION = "1.00_05";
 
 =head1 NAME
 
@@ -629,7 +629,16 @@
         # we're doing an IS or IS NOT (null), don't quote the operator.
 
         if ( $args{'QUOTEVALUE'} && $args{'OPERATOR'} !~ /IS/ ) {
-            $args{'VALUE'} = $self->_Handle->dbh->quote( $args{'VALUE'} );
+            my $tmp = $self->_Handle->dbh->quote( $args{'VALUE'} );
+
+            # Accomodate DBI drivers that don't understand UTF8
+	    if ($] >= 5.007) {
+	        require Encode;
+	        if( Encode::is_utf8( $args{'VALUE'} ) ) {
+	            Encode::_utf8_on( $tmp );
+	        }
+            }
+	    $args{'VALUE'} = $tmp;
         }
     }
 


More information about the Rt-commit mailing list