Ticket #88 (closed defect: fixed)
REXML doesn't handle spaces in XML declarations
| Reported by: | ser | Owned by: | ser |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.7 |
| Component: | DOM | Version: | 3.1.3 |
| Severity: | normal | Keywords: | |
| Cc: | Ruby version: | 1.8.2 | |
| Operating system: | Linux |
Description
Originally posted to RubyForge? as:
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6066&group_id=426
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)+
Change History
Note: See
TracTickets for help on using
tickets.
