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.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/gitlabhq/encode.rb b/lib/gitlabhq/encode.rb
deleted file mode 100644
index df40206d5eb..00000000000
--- a/lib/gitlabhq/encode.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-module Gitlabhq
- module Encode
- extend self
-
- def utf8 message
- return nil unless message
-
- hash = CharlockHolmes::EncodingDetector.detect(message) rescue {}
- if hash[:encoding]
- CharlockHolmes::Converter.convert(message, hash[:encoding], 'UTF-8')
- else
- message
- end.force_encoding("utf-8")
- # Prevent app from crash cause of
- # encoding errors
- rescue
- ""
- end
- end
-end