0

I want to write a graph G in GML format. My node names (label in GML) contain special characters like š, č etc. These are not replicated in the GML file when I do the following.

nx.write_gml(G, 'G.gml')

Expected output for letters šč is šč.

Actual output for letter šč is šč

Bibek Mishra
  • 180
  • 1
  • 15

1 Answers1

0

What you are seeing in the output are the correct XML character entity codes for the characters you referenced. It looks like the "nx" facility is producing a GML file with encoding set to something other than UTF-8 which is the most common these days.

crsguy
  • 15
  • 6