I have the following problem regarding XML encoding:
Erro: Byte inválido 2 da sequência UTF-8 do byte 3.
This error occurs when trying to canonize an XML.
I do not know exactly what the error might be, I guess it's because the String has the BOM character, so, could anyone tell me if there is a function or library in Java to identify if the XML is BOM? Or some function that removes the BOM?