summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/Shift-JIS.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/encodings/Shift-JIS.rb')
-rw-r--r--lib/rexml/encodings/Shift-JIS.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/encodings/Shift-JIS.rb b/lib/rexml/encodings/Shift-JIS.rb
index e805456ea7..d5267c01b2 100644
--- a/lib/rexml/encodings/Shift-JIS.rb
+++ b/lib/rexml/encodings/Shift-JIS.rb
@@ -18,11 +18,11 @@ rescue LoadError
module REXML
module Encoding
def from_shift_jis(str)
- return Iconv::iconv("utf-8", "shift-jis", str)[0]
+ return Iconv::iconv("utf-8", "shift-jis", str).join
end
def to_shift_jis content
- return Iconv::iconv("euc-jp", "shift-jis", content)[0]
+ return Iconv::iconv("shift-jis", "utf-8", content).join
end
end
end