Date: Tue, 3 Jul 2001 10:00:24 +0200 To: Jacques Garrigue Cc: luther at dpt-info.u-strasbg.fr, lablgtk at kaba.or.jp Subject: Re: [Caml-list] Re: postscript, printf module and coma separator. Message-ID: <20010703100024.A24617 at lambda.u-strasbg.fr> References: <20010608183321.A14580 at lambda.u-strasbg.fr> <20010611193053.B7177 at clipper.ens.fr> <20010612130358.A25491 at lambda.u-strasbg.fr> <20010703113017D.garrigue at kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010703113017D.garrigue at kurims.kyoto-u.ac.jp> From: Sven LUTHER Sender: Sven LUTHER On Tue, Jul 03, 2001 at 11:30:17AM +0900, Jacques Garrigue wrote: > From: Sven LUTHER > Subject: [Caml-list] Re: postscript, printf module and coma separator. > Date: Tue, 12 Jun 2001 13:03:58 +0200 > > > > > Unfortunately, i have the LANG variable set to fr_FR, and as thus fprintf > > > > outputs floats as : > > > > > > > > 3,14 > > > > > > > > but this is not a valid postscript coordinate. > > > > > > That seems strange. I have also LANG and LC_CTYPE set to fr_FR, and I do > > > not have the problem. And that under Linux (GNU libc) and Solaris. There is > > > the problem with LablGtk, because GMain.Main.init sets the locale (if you > > > use the toplevel, you can not even enter a new non-integer float, since the > > > ascii -> number fails on the `.'). So I think the bug is inside LablGtk, > > > and should be corrected there (maybe an optional parameter to change the > > > environment variable before gtk_set_locale). > > Sorry for the very slow answer. > No, I don't believe that LablGTK does anything wrong: you have to call > setlocale if you want to make possible any internationalization of > your application, including fonts. In theory setting LC_NUMERIC to C > should be enough to solve the problem, but this can be hairy. > > For hard cases, the last snapshot of lablgtk (2001-05-23) adds a > ?nolocale option to GMain.Main.init, which you can use as a quick hack > to disable the call to setlocale. Note, i tried setting LANG to "" empty before doing the writting, but this didn't work, i don't understand why. I guess it is because the env var will only be taken in account at app launch time ? I will try the nolocale option, but maybe a wrapping of the Printf & co module would be nice, In any case, we should have the same behavior that ocaml, this is very confusing when it is not so. Friendly, Sven Luther > > Jacques