# File src/rexml/encoding.rb, line 28
                def check_encoding str
                        rv = ENCODING_CLAIMS.find{|k,v| str =~ k }
                        # Raise an exception if there is a declared encoding and we don't
                        # recognize it
                        unless rv
                                if str =~ /^\s*<?xml\s*version=(['"]).*?\1\s*encoding=(["'])(.*?)\2/
                                        raise "A matching encoding handler was not found for encoding '#{$3}', or the encoding handler failed to load due to a missing support library (such as uconv)."
                                else
                                        return UTF_8
                                end
                        end
                        return rv[1]
                end