xml formatting with commas not decimals

hey,

i am trying to compile an app on a spanish system (ubuntu 9.10 ) and it seems all my xml files are outputting float values with commas instead of decimal points (euro-style)… reading the xml back in to use the data doesn’t work properly (replacing the , by hand to . fixes it)… does anyone know if this is a compiler setting, tinyxml setting or something else?

thanks

I know this isn’t a full answer, but I think you need to investigate c++ locales –

http://rupertrawnsley.blogspot.com/2005-…-cales.html
http://stdcxx.apache.org/doc/stdlibug/24-3.html
http://www.cplusplus.com/forum/beginner/5657/

I hope this helps! please let me know if something works out for you (besides changing the text).

take care,
zach

hey hey!

i had to solve this some time ago and then lost the code, i modified xmlSettings so when saving/loading floats it replaces every , by a .

also if you’re on ubuntu a simple solution is to do this before running the app or even before running codeblocks:

export LC_ALL=C

I wonder if this would be the same thing then ?

  
setlocale("LC_ALL", "C");  

http://www.cplusplus.com/reference/clib-…-setlocale/

  • z

haven’t tested but it seems so, and better than using a system environment variable