Skip to content

Commit

Permalink
Merge pull request #704 from tader/workaround-charlock-holmes
Browse files Browse the repository at this point in the history
Rescue from CharlockHolmes failures.
  • Loading branch information
dzaporozhets committed Apr 24, 2012
2 parents af99e4a + b53df22 commit bbb93de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gitlabhq/encode.rb
Expand Up @@ -3,7 +3,7 @@ module Encode
extend self

def utf8 message
hash = CharlockHolmes::EncodingDetector.detect(message)
hash = CharlockHolmes::EncodingDetector.detect(message) rescue {}
if hash[:encoding]
CharlockHolmes::Converter.convert(message, hash[:encoding], 'UTF-8')
else
Expand Down

0 comments on commit bbb93de

Please sign in to comment.