Comments (5)
My outputs is actually the output of dot.exe after passing it that simple digraph from your example. That is where the height and position info comes from. It's the default standard out when no image is specified.
I figured it was best to bypass Export-PSGraph while troubleshooting this one. I was unable to find a viable workaround in PowerShell 5.1 in my testing.
from psgraph.
I did a little more testing on this. When I pipe in your sample graph, I get this output:
digraph g {
graph [bb="0,0,87.092,108",
compound=true
];
node [label="\N"];
"Fran?ois" [height=0.5,
pos="43.546,90",
width=1.1735];
"S?rensen" [height=0.5,
pos="43.546,18",
width=1.2096];
"Fran?ois" -> "S?rensen" [pos="e,43.546,36.104 43.546,71.697 43.546,63.983 43.546,54.712 43.546,46.112"];
}
This confirms what you are seeing. My next test was to save our graph as a file and give that as a parameter to $graphviz
& $graphviz c:\temp\graph.dot
digraph g {
graph [bb="0,0,88.392,108",
compound=true
];
node [label="\N"];
Franτois [height=0.5,
pos="44.196,90",
width=1.1735];
S°rensen [height=0.5,
pos="44.196,18",
width=1.2277];
Franτois -> S°rensen [pos="e,44.196,36.104 44.196,71.697 44.196,63.983 44.196,54.712 44.196,46.112"];
}
I don't get the ?
this time, but these characters are still not correct.
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.666
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.666
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
from psgraph.
I started trying to reproduce these results with PowerShell 6.1. From the console, this output also looks wrong:
$graph | & $graphViz
digraph g {
graph [bb="0,0,88.392,108",
compound=true
];
node [label="\N"];
François [height=0.5,
pos="44.196,90",
width=1.1735];
S├╕rensen [height=0.5,
pos="44.196,18",
width=1.2277];
François -> Sørensen [pos="e,44.196,36.104 44.196,71.697 44.196,63.983 44.196,54.712 44.196,46.112"];
}
But if I actually generate a graph it will show the correct characters. It looks like this is solved in PowerShell 6.1. So this is a bug with Windows Powershell and the way it pipes to executables.
Still trying to chase down why saving to a file first is not working like I would expect. So I am playing with file encodings.
from psgraph.
I was able to get it to work from a file if I saved it this way:
$graph | Set-Content c:\temp\graph.dot -Encoding utf8NoBOM
But that encoding option is not available on Windows PowerShell 5.1
I hate to close the issue this way but I don't have an easy way to fix this on my end. It's resolved by updating PowerShell to the current version (PS 6.1).
from psgraph.
The digraph I get when running the initail command is a lot different from yours.
I installed PSGraph in Powershell 6.1 - had to AllowClubber since node has a twin in PSDesiredStateConfiguration. In both Windows Powershell 5.1 and Powershell 6.1 I get this result:
PS C:\>graph g { edge "François" "Sørensen" }
digraph g {
compound="true";
"François"->"Sørensen"
}
No hight, position and width at all.
But in Powershell 6.1 there is a huge difference in the output. If I go:
graph g { edge "François" "Sørensen" } | Export-PSGraph -ShowGraph
The names show up with ? in strad of the european characters in Windows Powershell 5.1:
But in Powershell 6.1 the image includes the correct european characters.
from psgraph.
Related Issues (20)
- Custom Label HTML
- rank Attributes (namely rankType)
- More examples in readme.md HOT 3
- Problem with chars HOT 2
- Building dependency diagrams
- Error with Installing GraphViz/PsGraph HOT 2
- [Question] Is there any way to set the graph background as transparent? HOT 1
- Node cmdlet conflicts with node.js command name HOT 4
- Export-PSGraph -showgraph and destination path problem HOT 1
- Subgraph cmdlet and the invisible node (A Harry Potter Movie) HOT 2
- Add which OS is supported in docs / readme.md
- Doesn't detect Graphviz on linux HOT 3
- Version miss match gallery / master branch? HOT 1
- Detect graphViz outside of -GraphVizPath HOT 2
- Parse Exception HOT 6
- Cylinder Shape HOT 1
- Resolve DestinationPath before passing it to GraphViz
- PSGraph in Azure Pipelines HOT 1
- Setting compound=false fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psgraph.