Menu

#105 reading doubles is locale specific

open
nobody
None
5
2010-03-14
2010-01-25
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
     
  • Armin Burgmeier

    Armin Burgmeier - 2010-03-14
    • status: pending --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.