Index: search-behavior/lib/search_behavior.rb
===================================================================
--- search-behavior/lib/search_behavior.rb	(revision 3)
+++ search-behavior/lib/search_behavior.rb	(working copy)
@@ -1,5 +1,9 @@
 # SearchBehavior
 
+$KCODE = 'u'
+require 'jcode'
+require 'unicode'
+
 class SearchBehavior < Behavior::Base
   
   register 'Search'
@@ -143,7 +147,7 @@
         end
         content << %{<script type="text/javascript">
 //<![CDATA[
-new Form.Element.Observer('q', 1, function(element, value) {new Ajax.Updater('#{update_element}', '#{page.url}live', {asynchronous:true, evalScripts:true, parameters:'q=' + escape($F('q'))})})
+new Form.Element.Observer('q', 1, function(element, value) {new Ajax.Updater('#{update_element}', '#{page.url}live', {asynchronous:true, evalScripts:true, parameters:'q=' + encodeURIComponent($F('q'))})})
 //]]>
 </script>}
       end
@@ -185,7 +189,7 @@
     LOGGER.debug("Params: #{query.inspect}")
     if not query.to_s.strip.empty?
       @query = query.to_s.strip
-      tokens = query.split.collect { |c| "%#{c.downcase}%"}
+      tokens = query.split.collect { |c| "%#{Unicode::downcase(c)}%"}
       pages = Page.find(:all, :include => [ :parts ],
           :conditions => [(["((LOWER(content) LIKE ?) OR (LOWER(title) LIKE ?))"] * tokens.size).join(" AND "), 
                          *tokens.collect { |token| [token] * 2 }.flatten])
