I am trying to access the rest definitions using the swagger servlet.
My operation description is in Danish and includes the character "æ".
Thus, the xml string generated in line 371 of org.apache.camel.management.mbean.ManagedCamelContext.dumpRestsAsXml
contains the character "æ".
In line 376-377, wh have
The call to xml.getBytes() uses the default encoding (CP-1252 in my case), which will encode æ as a single byte. The xml parser expects UTF-8 (since the xml starts with an xml declaration specifying encoding="UTF-8").
Therefore, it fails with "Invalid byte 2 of 3-byte UTF-8 sequence".
The fix is simple - change xml.getBytes() to xml.getBytes("UTF-8");