To: luther at dpt-info.u-strasbg.fr Cc: lablgtk at kaba.or.jp Subject: Re: [Caml-list] Re: postscript, printf module and coma separator. In-Reply-To: <20010703100024.A24617 at lambda.u-strasbg.fr> References: <20010612130358.A25491 at lambda.u-strasbg.fr> <20010703113017D.garrigue@kurims.kyoto-u.ac.jp> <20010703100024.A24617@lambda.u-strasbg.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010703182516I.garrigue at kurims.kyoto-u.ac.jp> Date: Tue, 03 Jul 2001 18:25:16 +0900 From: Jacques Garrigue Lines: 39 > > 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 ? You should call setlocale everytime you change it. > I will try the nolocale option, but maybe a wrapping of the Printf & > co module would be nice, For me this is clearly a bug in Caml: code should not break because you call setlocale somewhere. But well, I am starting to think that reverting the default to not calling setlocale might be reasonable, since this seems to be a real pain for French users. (Turning it off by default will be a pain for Japanese users, since they need it on to print anything...) > In any case, we should have the same behavior that ocaml, this is very > confusing when it is not so. Well, yes. Part of the culprit is also the habit of setting LC_ALL, meaning that even if you set LC_NUMERIC to C it will be ignored. unset LC_ALL export LC_NUMERIC=C export LANG=fr_FR and everybody should be happy... Jacques