diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-10 02:30:08 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-10 02:30:08 +0000 |
commit | 5749fb74dc892bf4ac7aaf7ddfc25af4fcb97f0c (patch) | |
tree | 7449f76f6a4c32942ed4d1c4804057f57ecdb43b /lib/rexml | |
parent | c415ba8c6ef8b2f942326c949cc8e1f356204431 (diff) | |
download | ruby-5749fb74dc892bf4ac7aaf7ddfc25af4fcb97f0c.tar.gz ruby-5749fb74dc892bf4ac7aaf7ddfc25af4fcb97f0c.tar.xz ruby-5749fb74dc892bf4ac7aaf7ddfc25af4fcb97f0c.zip |
* lib/rexml/encodings/EUC-JP.rb (Encoding): use join.
* lib/rexml/encodings/Shift-JIS.rb (Encoding): use join, and
typo fixed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r-- | lib/rexml/encodings/EUC-JP.rb | 4 | ||||
-rw-r--r-- | lib/rexml/encodings/Shift-JIS.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/rexml/encodings/EUC-JP.rb b/lib/rexml/encodings/EUC-JP.rb index 23a1c3c65..1be5663be 100644 --- a/lib/rexml/encodings/EUC-JP.rb +++ b/lib/rexml/encodings/EUC-JP.rb @@ -18,11 +18,11 @@ rescue LoadError module REXML module Encoding def from_euc_jp(str) - return Iconv::iconv("utf-8", "euc-jp", str)[0] + return Iconv::iconv("utf-8", "euc-jp", str).join end def to_euc_jp content - return Iconv::iconv("euc-jp", "utf-8", content)[0] + return Iconv::iconv("euc-jp", "utf-8", content).join end end end diff --git a/lib/rexml/encodings/Shift-JIS.rb b/lib/rexml/encodings/Shift-JIS.rb index e805456ea..d5267c01b 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 |