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 | a2428e6f6b08b37179d2856332b0d4a21568469a (patch) | |
| tree | c532c699d3fdda1760d3a84ef14ab26ae95fa443 | |
| parent | 65c5fe38e4baee78abebe2a77c41e739129da57c (diff) | |
| download | ruby-a2428e6f6b08b37179d2856332b0d4a21568469a.tar.gz ruby-a2428e6f6b08b37179d2856332b0d4a21568469a.tar.xz ruby-a2428e6f6b08b37179d2856332b0d4a21568469a.zip | |
Fixed Issue7: DocType with external IDs was not being quoted.
SHIFT_JIS now merely includes Shift-JIS
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | lib/rexml/doctype.rb | 2 | ||||
| -rw-r--r-- | lib/rexml/encodings/SHIFT_JIS.rb | 34 | ||||
| -rw-r--r-- | lib/rexml/rexml.rb | 4 |
3 files changed, 4 insertions, 36 deletions
diff --git a/lib/rexml/doctype.rb b/lib/rexml/doctype.rb index 506952312..d69de214b 100644 --- a/lib/rexml/doctype.rb +++ b/lib/rexml/doctype.rb @@ -189,7 +189,7 @@ module REXML end def to_s - "<!NOTATION #@name #@middle #@rest>" + "<!NOTATION #@name '#@middle #@rest'>" end def write( output, indent=-1 ) diff --git a/lib/rexml/encodings/SHIFT_JIS.rb b/lib/rexml/encodings/SHIFT_JIS.rb index 27e456940..6e8f75937 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' diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb index e955fa8fa..5ff907542 100644 --- a/lib/rexml/rexml.rb +++ b/lib/rexml/rexml.rb @@ -21,6 +21,6 @@ # A tutorial is available in docs/tutorial.html module REXML Copyright = "Copyright #{Time.now.year} Sean Russell <ser@germane-software.com>" - Date = "+2004/044" - Version = "2.7.4" + Date = "+2004/047" + Version = "2.7.4.1" end |
