View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012948VTK(No Category)public2012-02-20 05:552016-08-12 09:55
ReporterHanno Hugenberg 
Assigned ToDave DeMarle 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version 
Summary0012948: Localization problem with human readable file formats (obj, ply, ... )
DescriptionLoading and writing of human readable file formats fails if a localisation for a program is used, which changes the representation of float values.

Bugreport is created after a discussion on the user mailing list:

http://www.vtk.org/pipermail/vtkusers/2012-February/121416.html [^]

The reader/writer classes e.g. "vtkOBJReader"

are using sscanf for reading float values from the files.
Problem is:
- the obj standard describes the use of '.' float values like "1.7"
- if a program changes the localisation to a form which uses e.g. ',' as a float decimal seperator like "1,7", the Reader and Writer classes are not able to load obj files anymore.

Since the Reader/Writer have to verify that it is always reading the standard float values, i suggest the use of

sscanf_l() and sprintf_l() calls (which should be supported by various plattforms.

A different apporoach would be saveing the global localisation, set it for the time of reading to the compatible mode "c" and then set it back to the former values. But this would be a hack.
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships
related to 0012121closedDave DeMarle STL reader internationalisation screws up 

  Notes
(0028307)
Hanno Hugenberg (reporter)
2012-02-20 05:58

Localization is automaticaly changed, if you use for example QT with German settings.
So it happens without changing the localization via "setlocale()" "locale.h" by yourself.
(0031173)
Dave DeMarle (administrator)
2013-07-22 16:44

If this is still a problem in 6.0, please reopen this bug.
(0037268)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-02-20 05:55 Hanno Hugenberg New Issue
2012-02-20 05:58 Hanno Hugenberg Note Added: 0028307
2013-06-05 15:30 Jean-Christophe Fillion-Robin Relationship added related to 0012121
2013-07-22 16:44 Dave DeMarle Note Added: 0031173
2013-07-22 16:44 Dave DeMarle Status backlog => expired
2013-07-22 16:44 Dave DeMarle Resolution open => fixed
2013-07-22 16:44 Dave DeMarle Assigned To => Dave DeMarle
2013-07-22 16:44 Dave DeMarle Resolution fixed => open
2016-08-12 09:55 Kitware Robot Note Added: 0037268
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team