[vtkusers] Localization problem with reading and writing of human readable file formats, obj, ply, ...
Sean McBride
sean at rogue-research.com
Mon Feb 13 12:32:13 EST 2012
On Mon, 13 Feb 2012 10:30:00 +0100, Hanno Hugenberg said:
>a german localized "sscanf" expects as float a string with comma
>seperation like:
> "7,123"
>
> BUT: the obj standard defines the use of point seperation like:
>"7.123"
>
>This problem is similar to a very old topic in the mailinglist archive:
>http://public.kitware.com/pipermail/insight-users/2006-July/018783.html
>
>The suggestion was to use the
>
>setlocale (LC_NUMERIC,"C");
>
>command from the standard c library to switch back to the general
>"7.123" reading behaviour.
>But this may corrupt other parts in a program which rely on the local
>settings already done.
Well, there's also sscanf_l() which takes a locale as a parameter. That would probably be better, if it's available on all platforms that VTK cares about.
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list