Bugs item #6066, was opened at 2006-10-09 10:15
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6066&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Akihiro ARISAWA (arisawa)
Assigned to: Nobody (None)
Summary: REXML cannot parse encoding if space(s) exist around equal

Initial Comment:
REXML cannot parse encoding if space(s) exist around equal.

% ruby -v
ruby 1.8.5 (2006-08-25) [i486-linux]

% ruby -rrexml/document -e 'puts REXML::Document.new("<?xml version=\1.0\ encoding=\shift_jis\?>")'
<?xml version='1.0' encoding='SHIFT_JIS'?>

% ruby -rrexml/document -e 'puts REXML::Document.new("<?xml version=\1.0\ encoding = \shift_jis\?>")'
<?xml version='1.0'?>



cf. Extensible Markup Language (XML) 1.0 (Second Edition):
        [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
        [25] Eq           ::= S? '=' S?
        [3]  S            ::= (#x20 | #x9 | #xD | #xA)+


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6066&group_id=426