Embedded dot generates broken svg

0 votes
asked Dec 4, 2025 in Bug by pmz (120 points)

Hello,

What I do : 

The following source test.puml : 

@startuml
digraph dfd{
problem -> solution [label = "é"]
}
@enduml

Rendered, under windows with he command : 

javaw -jar plantuml.jar -charset UTF-8 -tsvg test.puml

Notepad++ indicates my file is encoded in utf8.

What happen : 

the generated svg is broken : the first line in the svg is not compliant with xml, it looks like a dot error message : 
"Warning: Invalid 3-byte UTF8 found in input of graph dfd - treated as Latin-1. Perhaps "-Gcharset=latin1" is needed?"

Yet, after removing this line, the svg is correct, the content is also correct : the "é" is here.

Result is the same with png format.

Using : 

dot is the dot embedded in plantuml version plantuml-1.2025.10 on Windows 11.

Further test : 

I run similar test with a later dot version using 

$env:GRAPHVIZ_DOT="C:\Dev\Outils\Graphviz\bin\dot.exe"

javaw -jar plantuml.jar -charset UTF-8 -tsvg test.puml

with the same result.

What I expect : 

I think that if there is an error, no output should be generated at all, at least not an invalid output (a valid svg with the error message)

I think all the input is UTF8, so I think that there should be no error at all.

Regards,

PMZ

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...