Browse thread
[Caml-list] string_of_float -> float_of_string locale dependency bug
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-06-14 (15:58) |
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/ <yoriyuki@mbg.ocn.ne.jp> 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? Performance? 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 locale.py. -- ... WBR, Evgeny ... ------------------- 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