diff options
author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-16 21:42:10 +0000 |
---|---|---|
committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-16 21:42:10 +0000 |
commit | b84ebdcb0597511207c4768e97ce313e0b9d4dbf (patch) | |
tree | c532c699d3fdda1760d3a84ef14ab26ae95fa443 /lib/rexml/encodings/SHIFT_JIS.rb | |
parent | 7430c46af697b32cd20d902b4613cea206f47d04 (diff) |
Fixed Issue7: DocType with external IDs was not being quoted.
SHIFT_JIS now merely includes Shift-JIS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/encodings/SHIFT_JIS.rb')
-rw-r--r-- | lib/rexml/encodings/SHIFT_JIS.rb | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/lib/rexml/encodings/SHIFT_JIS.rb b/lib/rexml/encodings/SHIFT_JIS.rb index 27e4569403..6e8f759373 100644 --- a/lib/rexml/encodings/SHIFT_JIS.rb +++ b/lib/rexml/encodings/SHIFT_JIS.rb @@ -1,33 +1 @@ -begin - require 'uconv' - - module REXML - module Encoding - def to_shift_jis content - Uconv::u8tosjis(content) - end - - def from_shift_jis(str) - Uconv::sjistou8(str) - end - end - end -rescue LoadError - begin - require 'iconv' - module REXML - module Encoding - def from_shift_jis(str) - return Iconv::iconv("utf-8", "shift_jis", str).join('') - end - - def to_shift_jis content - return Iconv::iconv("shift_jis", "utf-8", content).join('') - end - end - end - rescue LoadError - raise "uconv or iconv is required for Japanese encoding support." - end - -end +require 'rexml/encodings/Shift-JIS' |