It's related to the encoding with which the XML is parsed.
The encoding specified in
<?xml version="1.0" encoding="UTF-8"?>
is guaranteed to be used unless the user provides a java.io.Reader to the parser. Which is what happens in our case, the encoding specified in the XML is ignored and the system default one is used instead.