setlocale portability


Subject: setlocale portability
From: Hubert Figuiere (hfiguiere@teaser.fr)
Date: Mon Apr 02 2001 - 07:43:38 CDT


There is but 1291 this is IMHO really critical as it involves data
corruption.

http://bugzilla.abisource.com/show_bug.cgi?id=1291

The problem is that sprintf() honour locale on Linux. So when writting a
float using %f use decimal separator set for locale, raising
incompatibilities of file format.

My question is how portable is setlocale() to revert locale back to "C" when
writting the file ? Because setlocale() can be the solution to the problem.

Hub



This archive was generated by hypermail 2b25 : Mon Apr 02 2001 - 07:43:43 CDT