From kde-devel Thu Aug 30 09:10:14 2007 From: Benoit Jacob Date: Thu, 30 Aug 2007 09:10:14 +0000 To: kde-devel Subject: Re: problem with KCmdLineArgs::init() (was: weird issue in kalzium) Message-Id: <20070830110712.R15329 () cantor ! math ! jussieu ! fr> X-MARC-Message: https://marc.info/?l=kde-devel&m=118846716532258 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--0-674936581-1188465014=:15329" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-674936581-1188465014=:15329 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Indeed, that does also trigger the bug. As to why the locale affects the parsing, I've found the explanation: the= =20 locale affects which character is the decimal point. So what really=20 matters here is LC_NUMERIC. If I leave the KCmdLineArgs::init call and put right after it setlocale(LC_NUMERIC, "C"); then the problem vanishes. So indeed, bug in OpenBabel. Thanks for your help Thiago and Pino! Benoit On Thu, 30 Aug 2007, Thiago Macieira wrote: > On Thursday 30 August 2007 10:31:08 Benoit Jacob wrote: >> Any idea? > > Yes. Bug in OpenBabel. > > Try replacing your call to KCmdLineArgs::init with this: > setlocale(LC_ALL, ""); > > --=20 > =C2=A0 Thiago Macieira =C2=A0- =C2=A0thiago (AT) macieira.info - thiago (= AT) kde.org > =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint: > =C2=A0 =C2=A0 E067 918B B660 DBD1 105C =C2=A0966C 33F5 F005 6EF4 5358 > --0-674936581-1188465014=:15329 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --0-674936581-1188465014=:15329--