summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/SHIFT-JIS.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-19 15:31:17 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-19 15:31:17 +0000
commit8aeb8712f8e87965942c8268e9708947faec4dfb (patch)
treec3e8a20529d7eca13bdf6ea5b88b36dfea74e7d8 /lib/rexml/encodings/SHIFT-JIS.rb
parent0052b9172e61182d850f3919badf2f1d99a9092f (diff)
* lib/rexml/encodings/SHIFT-JIS.rb: backported from CVS HEAD.
* lib/rexml/encodings/SHIFT_JIS.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/encodings/SHIFT-JIS.rb')
-rw-r--r--lib/rexml/encodings/SHIFT-JIS.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rexml/encodings/SHIFT-JIS.rb b/lib/rexml/encodings/SHIFT-JIS.rb
index e7dc6339ae..f17c927864 100644
--- a/lib/rexml/encodings/SHIFT-JIS.rb
+++ b/lib/rexml/encodings/SHIFT-JIS.rb
@@ -5,11 +5,11 @@ begin
module Encoding
@@__REXML_encoding_methods =<<-EOL
def decode(str)
- return Iconv::iconv("utf-8", "shift-jis", str)[0]
+ return Iconv::iconv("utf-8", "shift_jis", str)[0]
end
def encode content
- return Iconv::iconv("shift-jis", "utf-8", content)[0]
+ return Iconv::iconv("shift_jis", "utf-8", content)[0]
end
EOL
end
@@ -21,11 +21,11 @@ rescue LoadError
module REXML
module Encoding
@@__REXML_encoding_methods =<<-EOL
- def to_shift_jis content
+ def encode(content)
Uconv::u8tosjis(content)
end
- def from_shift_jis(str)
+ def decode(str)
Uconv::sjistou8(str)
end
EOL