Write.gexf does not export UTF-8 characters correctly

Issue #20 new
Guillem Vicens created an issue

Hi George,

in R when exporting with write.gexf UTF-8 encoding for special characters (accents and the like) seem to get lost. As it seems the export is done to UTF-8 without BOM.

I have reproduced this by doing following steps:

  1. loading the graph data from 2 .CSV encoded in UTF-8 .1.
  2. Generate a graph by using the igraph package. This graph is used in my code to perform several calculations
  3. Generate the nodes and edges data frames. Up until this point all is correctly encoded in UTF-8.
  4. Use write.gexf to generate the .GEXF file. At this point encoding gets lost.

I also tried using both Encoding(x) and enc2utf8(x) with no success at all.

I have attached a minimal example to reproduce the problem. Session info is also included.

Thanks for any help!

Comments (1)

  1. Log in to comment