idekerlab / dot-app

Cytoscape application for exporting to .dot file format
GNU General Public License v3.0
7 stars 4 forks source link

Broken number formatting in exported files while using certain non-US locales #5

Closed plpau closed 8 years ago

plpau commented 8 years ago

Exporting files when the locale is set to a country where the decimal separator is a comma (e.g. Italian) results in broken files, as the number is in a different format than expected according to the file format, and moreover, there is confusion with the comma used as a separator.

For example, an exported file may contain strings such as: height = "0,486111" pos = "657,480438,73,763700" instead of height = "0.486111" pos = "657.480438,73.763700".

Ultimately, these files cannot be imported back into Cytoscape or into other software.

I have found this issue in version 0.9.1 of this app, with Cytoscape 3.2.1 and 3.3.0 under Linux, using Italian locale. Forcing en-US locale when launching Cytoscape is a viable workaround.

The number formatting tool used in writing and reading interchange files ought to be changed with one that is non-locale-aware or, at a pinch, en-US locale ought to be forced.

bdtfitts commented 8 years ago

Completely resolved as of v0.9.3 of dot-app. Changed how decimal numbers are formatted so that it is not locale dependent. Decimal point separator is forced as a period (.)