http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47007
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org 2010-12-18 19:38:22 UTC --- (In reply to comment #0) > Namelist files can be generated on any platform with any locale settings. And > namelist files must be usable among this platforms. But today some data in > namelist files depends on locale settings, for example floating point format. > So when you try to open namelist file, generated on en_US locale in the > environment with ru_RU locale, for example, you get into trouble with reading > floating points values. > Namelist entry > DT=7.3000002E-011 > is read as 7.3E-11 on en_US and as 7 in ru_RU. > > Namelist should not depend on locale settings, so we can open namelist file > generated with any locale settings on any other locale settings, without > changing file and locale. The standard is fairly clear on the behavior. >From the final committee draft of F2008, page 268 The datum c (10.11) is any input value acceptable to format specifications for a given type, except for a restriction on the form of input values corresponding to list items of types logical, integer, and character as specified in this subclause. The form of a real or complex value is dependent on the decimal edit mode in effect (10.6). F2008, Section 10.6 The decimal symbol is the character that separates the whole and fractional parts in the decimal representation of a real number in an internal or external file. When the decimal edit mode is POINT, the decimal symbol is a decimal point. When the decimal edit mode is COMMA, the decimal symbol is a comma. If a user switches between systems with different locale, then the user should explicitly set the editor descriptor (or edit the namelist file).