kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #09715
Re: Locale fix in KiCAD is not working (breaks my build)
Le 15/03/2013 12:57, Miguel Angel Ajo Pelayo a écrit :
Jean Pierre,
It sounds like what I need, without adding dependencies on 2.9 or 3.0 (as Edwin was pointing me privately).
Anyway, that cannot be a problem with threading? or it just sets locale "locally" and not App wide?
Thanks a lot for the help,
I am thinking it is app wide.
However the switch is only made during a very short time.
And it is mandatory to read files with fp numbers.
However if you want to convert "by hand" the fp number,
value.Replace(",",".");
should be
value.Replace( wxT(","), wxT(".") );
(Assuming there is no other separator used by some other languages).
Miguel Angel Ajo
http://www.nbee.es
+34911407752
skype: ajoajoajo
On 15/03/2013, at 12:49, jp charras <jp.charras@xxxxxxxxxx> wrote:
We have this kind of issue for all I/O file functions.
In KiCad there is a class named LOCALE_IO to fix it
thee ctor switches on the "C" fp notation, and the dtor restores the current locale.
See for instance the line:
LOCALE_IO toggle; // toggles on, then off, the C locale.
in pcb_parser.cpp, line 333
--
Jean-Pierre CHARRAS
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
--
Jean-Pierre CHARRAS
Follow ups
References