HomeSoftware Heritage

maven: Prevent UnicodeDecodeError when processing pom file

Description

maven: Prevent UnicodeDecodeError when processing pom file

Pass the raw bytes of pom file content in xmltodict.parse and let
it do the string decoding based on the encoding declared in pom file.

If the string decoding failed due to an invalid declared encoding,
xml.parsers.expat.ExpatError will be raised and will be caught by
the lister, ignoring the pom file and continuing listing.

Related to T3874