Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] string_of_float -> float_of_string locale dependency bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Evgeny Chukreev <sjah@l...>
Subject: Re: [Caml-list] string_of_float -> float_of_string locale dependency bug
On Tue, 15 Jun 2004 00:23:47 +0900 (JST)
    /Yamagata/ /Yoriyuki/ <> wrote:

XL>> The C library API for internationalization is largely broken, and as
XL>> you can see there is nothing we can do to work around the fact that
XL>> the current locale is a global variable for the whole program.

YY> You can temporally save the current LC_NUMERIC value, change its value
YY> to C, and restore the value after the conversion.  What is a problem?


Another approach: write own strtod function which doesn't depend on
the LC_NUMERIC locale.

Or take a look at Python's: _localemodule.c and

... WBR, Evgeny ...

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: