diff options
author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-13 11:50:13 +0000 |
---|---|---|
committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-13 11:50:13 +0000 |
commit | aff08f4d2bbc58436d5c1e450b6c2ec8da709dbc (patch) | |
tree | 9e7632cacfd07fa3730c770a676932273c2b38e7 /lib/rexml/encodings | |
parent | 2ccf84fd9703a42d1343e5de00bbd319b7e6a7d3 (diff) | |
download | ruby-aff08f4d2bbc58436d5c1e450b6c2ec8da709dbc.tar.gz ruby-aff08f4d2bbc58436d5c1e450b6c2ec8da709dbc.tar.xz ruby-aff08f4d2bbc58436d5c1e450b6c2ec8da709dbc.zip |
Merged in the changes from BSD bug report. shift-jis is now shift_jis, in
accordance with IANA
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/encodings')
-rw-r--r-- | lib/rexml/encodings/SHIFT-JIS.rb | 8 | ||||
-rw-r--r-- | lib/rexml/encodings/SHIFT_JIS.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/rexml/encodings/SHIFT-JIS.rb b/lib/rexml/encodings/SHIFT-JIS.rb index e7dc6339a..f17c92786 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 diff --git a/lib/rexml/encodings/SHIFT_JIS.rb b/lib/rexml/encodings/SHIFT_JIS.rb index 6e8f75937..8e8627da1 100644 --- a/lib/rexml/encodings/SHIFT_JIS.rb +++ b/lib/rexml/encodings/SHIFT_JIS.rb @@ -1 +1 @@ -require 'rexml/encodings/Shift-JIS' +load 'rexml/encodings/Shift-JIS' |