summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas A. de Ruiter <thomas@de-ruiter.cx>2012-04-24 12:41:20 +0200
committerThomas A. de Ruiter <thomas@de-ruiter.cx>2012-04-24 12:43:06 +0200
commitb53df221275ba17d63583cd02bb6e3ebd661760c (patch)
tree1569c69b2257a7bd86a4ce6a8d34a8ba0eefd84a
parentaf99e4afe18788a536c5e789153235f3ff44f67f (diff)
downloadgitlab-ce-b53df221275ba17d63583cd02bb6e3ebd661760c.tar.gz
Rescue from CharlockHolmes failure
-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