diff options
Diffstat (limited to 'lib/rexml/encoding.rb')
-rw-r--r-- | lib/rexml/encoding.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/encoding.rb b/lib/rexml/encoding.rb index 8acc8a3698..f003d6cc3b 100644 --- a/lib/rexml/encoding.rb +++ b/lib/rexml/encoding.rb @@ -56,7 +56,7 @@ module REXML # We have to recognize UTF-16, LSB UTF-16, and UTF-8 return UTF_16 if /\A\xfe\xff/n =~ str return UNILE if /\A\xff\xfe/n =~ str - str =~ /^\s*<?xml\s*version=(['"]).*?\2\s*encoding=(["'])(.*?)\2/um + str =~ /^\s*<?xml\s*version\s*=\s*(['"]).*?\2\s*encoding\s*=\s*(["'])(.*?)\2/um return $1.upcase if $1 return UTF_8 end |