From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA12791; Mon, 14 Jun 2004 18:04:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA12817 for ; Mon, 14 Jun 2004 18:04:49 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5EG4KEV006414; Mon, 14 Jun 2004 18:04:20 +0200 Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA14802; Mon, 14 Jun 2004 18:04:20 +0200 (MET DST) Date: Mon, 14 Jun 2004 18:04:20 +0200 From: Xavier Leroy To: Evgeny Chukreev Cc: Yamagata Yoriyuki , caml-list@inria.fr Subject: Re: [Caml-list] string_of_float -> float_of_string locale dependency bug Message-ID: <20040614180420.C28810@pauillac.inria.fr> References: <20040614115444.A14769@pauillac.inria.fr> <20040615.002347.94548124.yoriyuki@mbg.ocn.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from sjah@land.ru on Mon, Jun 14, 2004 at 10:57:12PM +0700 X-Miltered: at nez-perce with ID 40CDCC84.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 locale:01 bug:01 locale:01 reinventing:01 conversions:02 float:02 float:02 string:03 string:03 library:03 library:03 functions:05 quite:06 reads:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Another approach: write own strtod function which doesn't depend on > the LC_NUMERIC locale. Of course, having our own string <-> float conversions would work around this issue and other issues as well, such as the inability of the C library functions to print a float *exactly* (i.e. with just enough decimals that it reads back to the very same float). This is no small undertaking, however, and one has a feeling of reinventing the wheel. The ANSI C standard library is quite small to begin with, but the addition of locales managed to render it even less useful... - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners