diff options
Diffstat (limited to 'lib/xsd/charset.rb')
-rw-r--r-- | lib/xsd/charset.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/xsd/charset.rb b/lib/xsd/charset.rb index e0241fdebc..acdea8bcf3 100644 --- a/lib/xsd/charset.rb +++ b/lib/xsd/charset.rb @@ -103,7 +103,11 @@ public end def Charset.charset_str(label) - CharsetMap.key(label.downcase) + if CharsetMap.respond_to?(:key) + CharsetMap.key(label.downcase) + else + CharsetMap.index(label.downcase) + end end # us_ascii = '[\x00-\x7F]' |