Rescue from CharlockHolmes failure
This commit is contained in:
parent
af99e4afe1
commit
b53df22127
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ module Gitlabhq
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue