summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 780d839f420..1a81accea64 100644
--- a/lib/gitlabhq/encode.rb
+++ b/lib/gitlabhq/encode.rb
@@ -12,7 +12,7 @@ module Gitlabhq
# It's better to default to UTF-8 as sometimes it's wrongly detected as another charset
if detect[:encoding] && detect[:confidence] == 100
- CharlockHolmes::Converter.convert(message, encoding, 'UTF-8')
+ CharlockHolmes::Converter.convert(message, detect[:encoding], 'UTF-8')
else
message
end.force_encoding("utf-8")