<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -143,7 +143,7 @@ module EZ
               @negate ? [&quot;#{@table_prefix}#{@name} IS NOT NULL&quot;] : [&quot;#{@table_prefix}#{@name} IS NULL&quot;] 
             else
               if @case_insensitive and value.respond_to?(:upcase)
-                @negate ? [&quot;UPPER(#{@table_prefix}#{@name}) != ?&quot;, value.upcase] : [&quot;UPPER(#{@table_prefix}#{@name}) = ?&quot;, value.upcase] 
+                @negate ? [&quot;UPPER(#{@table_prefix}#{@name}) != ?&quot;, value.mb_chars.upcase] : [&quot;UPPER(#{@table_prefix}#{@name}) = ?&quot;, value.mb_chars.upcase] 
               else
                 @negate ? [&quot;#{@table_prefix}#{@name} != ?&quot;, value] : [&quot;#{@table_prefix}#{@name} = ?&quot;, value] 
               end
@@ -155,7 +155,7 @@ module EZ
               @negate ? [&quot;#{@table_prefix}#{@name} NOT REGEXP ?&quot;, str] : [&quot;#{@table_prefix}#{@name} REGEXP ?&quot;, str]           
             else
               if @case_insensitive and value.respond_to?(:upcase)
-                @negate ? [&quot;UPPER(#{@table_prefix}#{@name}) NOT LIKE ?&quot;, value.upcase] : [&quot;UPPER(#{@table_prefix}#{@name}) LIKE ?&quot;, value.upcase]
+                @negate ? [&quot;UPPER(#{@table_prefix}#{@name}) NOT LIKE ?&quot;, value.mb_chars.upcase] : [&quot;UPPER(#{@table_prefix}#{@name}) LIKE ?&quot;, value.mb_chars.upcase]
               else
                 @negate ? [&quot;#{@table_prefix}#{@name} NOT LIKE ?&quot;, value] : [&quot;#{@table_prefix}#{@name} LIKE ?&quot;, value]
               end</diff>
      <filename>lib/ez/clause.rb</filename>
    </modified>
    <modified>
      <diff>@@ -675,6 +675,13 @@ class EZWhereTest &lt; Test::Unit::TestCase
     assert_equal expected, cond.to_sql
   end
 
+  def test_case_insensitive_utf
+    cond = EZ::Where::Condition.new :my_table
+    cond.any_of(:title, :subtitle).nocase =~ '%za&#380;&#243;&#322;&#263;%'
+    expected = [&quot;(UPPER(my_table.title) LIKE ? OR UPPER(my_table.subtitle) LIKE ?)&quot;, &quot;%ZA&#379;&#211;&#321;&#262;%&quot;, &quot;%ZA&#379;&#211;&#321;&#262;%&quot;]
+    assert_equal expected, cond.to_sql
+  end
+  
   def test_handling_of_empty_clause_values
     clause = EZ::Where::Clause.new(:name)
     clause == nil</diff>
      <filename>test/ez_where_tests.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,6 @@ require 'rubygems'
 require 'active_record'
 require 'active_record/fixtures'
 require 'active_support'
-require 'active_support/breakpoint'
 
 require File.dirname(__FILE__) + '/../lib/ez/where'
 require File.dirname(__FILE__) + '/../lib/ez/clause'
@@ -11,6 +10,8 @@ require File.dirname(__FILE__) + '/../lib/ez/condition'
 require File.dirname(__FILE__) + '/../lib/ez/hash'
 require File.dirname(__FILE__) + '/../lib/ez/compositions'
 
+$KCODE = 'u' if RUBY_VERSION &lt; '1.9'
+
 config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
 ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + &quot;/debug.log&quot;)
 </diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d902d99736a5e320bfc3cbc09a6b09e48990807b</id>
    </parent>
  </parents>
  <author>
    <name>Ezra Zygmuntowicz</name>
    <email>ez@engineyard.com</email>
  </author>
  <url>http://github.com/ezmobius/ez-where/commit/7290d372f26adae0dd74f720b6501cebdb36edf0</url>
  <id>7290d372f26adae0dd74f720b6501cebdb36edf0</id>
  <committed-date>2009-02-14T14:27:20-08:00</committed-date>
  <authored-date>2009-02-14T14:27:20-08:00</authored-date>
  <message>fixing up to be rails 2.2 and multibyte aware for comparisons( Michal Lomnicki)</message>
  <tree>72ebc4b71441edd07c535f921d95483aa62f0f84</tree>
  <committer>
    <name>Ezra Zygmuntowicz</name>
    <email>ez@engineyard.com</email>
  </committer>
</commit>
