Description of problem: Migemo crashed when to input 'aiueo' on no euc-jp locale. Version-Release number of selected component (if applicable): 0.40-15.fc17 Steps to Reproduce: 1. Run migemo as follows $ export LANG=ja_JP.utf-8 $ $ echo 'aiueo' | migemo -d /usr/share/migemo/migemo-dict Actual results: Migemo crashed with following error: /usr/share/ruby/vendor_ruby/migemo-dict.rb:42:in `split': invalid byte sequence in UTF-8 (ArgumentError) from /usr/share/ruby/vendor_ruby/migemo-dict.rb:42:in `decompose' from /usr/share/ruby/vendor_ruby/migemo-dict.rb:72:in `block in lookup' from /usr/share/ruby/vendor_ruby/bsearch.rb:53:in `bsearch_lower_boundary' from /usr/share/ruby/vendor_ruby/bsearch.rb:115:in `bsearch_range' from /usr/share/ruby/vendor_ruby/migemo-dict.rb:71:in `lookup' from /usr/share/ruby/vendor_ruby/migemo.rb:163:in `expand_words' from /usr/share/ruby/vendor_ruby/migemo.rb:180:in `block in lookup0' from /usr/share/ruby/vendor_ruby/migemo.rb:177:in `each' from /usr/share/ruby/vendor_ruby/migemo.rb:177:in `lookup0' from /usr/share/ruby/vendor_ruby/migemo.rb:213:in `lookup' from /usr/share/ruby/vendor_ruby/migemo.rb:228:in `regex' from /usr/bin/migemo:138:in `block in main' from /usr/bin/migemo:147:in `call' from /usr/bin/migemo:147:in `main' from /usr/bin/migemo:163:in `<main>' Expected results: show pattern of 'aiueo' with euc-jp encoding.
Created attachment 590763 [details] patch for fix encoding probrem
I create a small patch for this issue. Please see attachment 590763 [details]. And I also send pull request to https://github.com/yshl/migemo-for-Ruby-1.9
Just array = line.chomp.force_encoding("EUC-JP").split("\t").delete_if do |x| x == nil end is enough?
It is just enough.
(In reply to comment #4) > It is just enough. Thank you.
migemo-0.40-16.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/migemo-0.40-16.fc17
Package migemo-0.40-16.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing migemo-0.40-16.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-9291/migemo-0.40-16.fc17 then log in and leave karma (feedback).
migemo-0.40-16.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.