Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Some text appears garbled when loaded from a project file #488
Non-ASCII text content is displayed garbled when loaded from a Gephi project file.
The issue occurs since Project API 0.8.0.1. In fact, it occurred right away after I had updated the Project API plugin from 0.8.0 to 0.8.0.1.
This is reproducible on my Mac and possibly affects other, if not all, OS X systems.
Saving seems to work properly; the issue affects only loading. It does not matter if the project was saved using the last plugin version or the new one.
Steps to reproduce
The issue is 100 % reproducible on my Mac. Just create a new project with a single node labeled
and save. As soon as the project is loaded again, the label says
My guess is that the issue affects systems whose Java runtime does NOT use UTF-8 as its default character encoding (e. g. the Java runtime on Mac OS).
My guess is that the issue might have been introduced with the fix for issue #465.
I have looked at the changes in 8f9dfd5 for a bit. It introduces an intermediate
The original file input stream is not handed directly to the XMLStreamReader anymore. Instead it’s now the InputStreamReader’s duty to decode bytes to characters – and to use the proper character encoding (XMLStreamReader did both before the change).
However, the constructor in line 103 –
As far as my guesswork is correct, the actual XML should be UTF-8 … so the InputStreamReader gets incorrect info about the encoding and creates the incorrect characters which it then hands further down to the XMLStreamReader.
Perhaps this could be fixed by just using
The issue went away when I downgraded to version 0.8.0 of the Project API plugin.
Issue #474 (November 15, 2011) mentions a similar problem with GEXF files.
added a commit
Dec 8, 2011
Yeah, great work claui :D
Hi mbastian and eduramiba,
Aww, thanks a lot for the kind words =)
to my fork … before I make the pull request?
Oh, don't worry. You don't have to do anything now.
Maybe I could have pulled it without request and pushed it to master.
The way to do this is using pull requests (http://help.github.com/send-pull-requests/).
Another way would be the following.