There is a documentation bug in calling PlantUML in Java and generate SVG.
The bug is on the last line. There should be a small supplement:
// The XML is stored into svg
final String svg = new String(os.toByteArray(), Charset.forName("UTF-8"));
Please correct this for all SVG lovers who like to use UTF characters and not only ASCII. Thanks.