Skip to content
Snippets Groups Projects
Commit b53df221 authored by Thomas A. de Ruiter's avatar Thomas A. de Ruiter
Browse files

Rescue from CharlockHolmes failure

parent af99e4af
No related branches found
No related tags found
1 merge request!704Rescue from CharlockHolmes failures.
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment