summaryrefslogtreecommitdiff
path: root/lib/gitlabhq/encode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlabhq/encode.rb')
-rw-r--r--lib/gitlabhq/encode.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlabhq/encode.rb b/lib/gitlabhq/encode.rb
index a493fb21192..11d9bd7bfd9 100644
--- a/lib/gitlabhq/encode.rb
+++ b/lib/gitlabhq/encode.rb
@@ -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