summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/rexml/encodings/SHIFT-JIS.rb8
-rw-r--r--lib/rexml/encodings/SHIFT_JIS.rb2
3 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 42ed70456a..ec79bd2fef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Dec 20 00:28:20 2004 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/encodings/SHIFT-JIS.rb: backported from CVS HEAD.
+
+ * lib/rexml/encodings/SHIFT_JIS.rb: ditto.
+
Sun Dec 19 17:19:48 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_x509store.c
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
diff --git a/lib/rexml/encodings/SHIFT_JIS.rb b/lib/rexml/encodings/SHIFT_JIS.rb
index 6e8f759373..2fc0b28306 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.rb'