danlucraft/rak — Issue #10: Can't search a UTF-8 string on Ruby 1.9
Author: kuroda
Created: 2011-12-30 12:31:08+00:00
State: open

I got following error messages when I tried to search a UTF-8 string like `☃` using rak:

/home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak (666):12:in `scan': incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak (666):12:in `block in match_file'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak (666):10:in `each_line'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak (666):10:in `match_file'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:380:in `block in search'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:414:in `find_all_files'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:420:in `block in find_all_files'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:416:in `each'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:416:in `find_all_files'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:420:in `block in find_all_files'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:416:in `each'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:416:in `find_all_files'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:449:in `block in each_file'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:448:in `each'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:448:in `each_file'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:374:in `search'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/gems/rak-1.3/bin/rak:780:in `'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/bin/rak:19:in `load'
from /home/kuroda/.rvm/gems/ruby-1.9.3-p0/bin/rak:19:in `

'

On Ruby 1.8.7, the same search is executed perfectly.