diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-26 13:47:57 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-28 10:44:10 +0100 |
commit | ca84f7b51f9c95fea57aca9ab5b1d911b467831f (patch) | |
tree | bd2dfc03efad6228e2767071fcd0d36ae14ab009 /lib/acts_as_xapian | |
parent | cf9f0b6096872557005bf92433ea3499697713f0 (diff) |
Make sure spelling corrections are encoded as UTF-8
Diffstat (limited to 'lib/acts_as_xapian')
-rw-r--r-- | lib/acts_as_xapian/acts_as_xapian.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index 6520a20a4..48d0b0554 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -375,7 +375,10 @@ module ActsAsXapian if correction.empty? return nil end - return correction + if correction.respond_to?(:force_encoding) + correction = correction.force_encoding('UTF-8') + end + correction end # Return array of models found |