Commit b53df221275ba17d63583cd02bb6e3ebd661760c

Authored by Thomas A. de Ruiter
1 parent af99e4af

Rescue from CharlockHolmes failure

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/gitlabhq/encode.rb
@@ -3,7 +3,7 @@ module Gitlabhq @@ -3,7 +3,7 @@ module Gitlabhq
3 extend self 3 extend self
4 4
5 def utf8 message 5 def utf8 message
6 - hash = CharlockHolmes::EncodingDetector.detect(message) 6 + hash = CharlockHolmes::EncodingDetector.detect(message) rescue {}
7 if hash[:encoding] 7 if hash[:encoding]
8 CharlockHolmes::Converter.convert(message, hash[:encoding], 'UTF-8') 8 CharlockHolmes::Converter.convert(message, hash[:encoding], 'UTF-8')
9 else 9 else