localization - changing locals for all io on a c++ code -
i using e57 library (http://www.libe57.org/) , have e57 data set can read them correctly, when decimal point in windows set '.', on system decimal point ',', doesn't work (for example on windows language set spain or norway , several other european language).
to test correctness code, using demoread application shipped library.
i can see when locals set decimal point '.', application can read data point :
x=0.24965 y=-0.1595 z=-0.29536
but if change decimal point in windows setting ',' application read these values:
x=24965 y=-15950 z=-29536
as don't want @ bug in big library, wondering if there way can change locals application in code?
i tried using code:
setlocale(lc_all,"en-us");
without success. there way can change decimal point char in code effect ios deep inside library?
you can set lc_numeric decimal point. monetary-formatting can set lc_monetary.
lc_numeric "printf family" , localeconv
Comments
Post a Comment