Re: [gtk-list] Re: locale affects (infects! ;) strtod()



Tim> so, for all of these places the conversion will be performed just
Tim> as if atol() has been used if the locale is different from
Tim> "POSIX" or "C".  i *really* don't think this would have been the
Tim> original intention of the various programmers.

I don't know if the original programmers considered the locale or not.

But if not, it does not make sense to automatically replace strtod
with a g_strtod that uses C locale rules.  If the value being
converted was entered by the user, then it should probably be
converted according to the locale.

That means each strtod call must be examined by hand to see whether it
should be converted.

Tom



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]