class Nokogiri::XML::SAX::ParserContext

def resolve_encoding(encoding)

def resolve_encoding(encoding)
ncoding
ncoding
ding
il
# totally fine, parser will guess encoding
nteger
("Passing an integer to Nokogiri::XML::SAX::ParserContext.io is deprecated. Use an Encoding object instead. This will become an error in a future release.", uplevel: 2, category: :deprecated)
rn nil if encoding == Parser::ENCODINGS["NONE"]
ding = Parser::REVERSE_ENCODINGS[encoding]
e ArgumentError, "Invalid libxml2 encoding id #{encoding}" if encoding.nil?
ding.find(encoding)
tring
ding.find(encoding)
e ArgumentError, "Cannot resolve #{encoding.inspect} to an Encoding"