Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002534graphvizDotpublic2015-03-26 20:522015-03-30 17:25
Assigned To 
StatusclosedResolutionno change required 
PlatformDell lattitudeOSWindowsOS Version2007
Summary0002534: Dot add extra ^M character for xDot output format when input dot file contains long lines with special char (more than 128 char)
DescriptionWhile trying to convert dot file to xdot format, some lines contains after conversion a newline character. The problem occurs wen we add special character from the 128th character in the content of texlbl.

The original line for a node description with tikz syntax is: "GESTWEET-J2EE" [texlbl="$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{aaaa$"];

after conversion i have this:

"GESTWEET-J2EA" [_ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 316 662.3 0 110 13 -GESTWEET-J2EA ",
        pos="316,666", texlbl="$\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\ \aaaaa a\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaa1aaaaa{\

xdot replaced the "{aaaaa" with "{\^Maaaa"
Steps To ReproduceExecute the command dot.exe" -v -Txdot <> on the following example:

digraph G {
"GESTWEET-J2EA" [texlbl="$\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\ \aaaaa a\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaa1aaaaa{aaaa$"];
Additional InformationI try to use pdflatex to convert dot file to pdf through dot2texi.
Pdflatex call graphviz dot command to convert the dot part into xdot format.
Due to the additionnal newline character, pdflatex cannot parse the result.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0000914)
drozier (reporter)
2015-03-27 22:13

I've tested on Centos 6.4 with Graphiz 2.38, and i face the same issue.
User avatar (0000915)
drozier (reporter)
2015-03-28 17:57

Ok, the severity of defect can be decreased. Coz i fixed the Windows parser of dot2tex to handle the newline character \r\n, but i think there is still a bug in the xdot conversion coz depending if there is a special character or not after the 128th position in the dot file a newline is inserted or not.
User avatar (0000918)
erg (administrator)
2015-03-30 17:25

This actually has nothing to do with xdot output or any of the layout programs, but is a feature of the underlying graph library. To aid readability, Graphviz has always tried to break long strings into multiple physical lines using the C language convention of inserting a backslash-newline (or, for Windows, a backslash-carriage return-newline). See [^] The reason "special characters" get involved is that the code tries not to break "words" but to only insert the breaks at non-alphanumeric characters.

The preferred maximum string length is an attribute. In particular, setting the graph attribute linelength=0 turns off this feature.

- Issue History
Date Modified Username Field Change
2015-03-26 20:52 drozier New Issue
2015-03-27 22:13 drozier Note Added: 0000914
2015-03-28 17:57 drozier Note Added: 0000915
2015-03-30 17:25 erg Note Added: 0000918
2015-03-30 17:25 erg Priority high => low
2015-03-30 17:25 erg Status new => closed
2015-03-30 17:25 erg Resolution open => no change required

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker