#105 reading doubles is locale specific

open
nobody
None
5
2010-03-14
2010-01-25
Armin Burgmeier
No

When reading a double value then the expected decimal separator is locale-dependant. Normally the decimal separator is well-defined in XML documents though, so I suggest to always use '.' instead. When using STL then this can easily be accomplished by using std::stringstream instead of scanf.

Discussion

  • Lee Thomason
    Lee Thomason
    2010-03-14

    I acknowledge the flaw, but how is the non-STL mode handled? And can scanf be run in a non-local mode? (Or do we need to rewrite scanf?)

    Setting to 'pending' for ideas or feedback.

     
  • Lee Thomason
    Lee Thomason
    2010-03-14

    • status: open --> pending
     
    • status: pending --> open