I have lua program, that loads data from string. I need to convert those data to double, using tonumber. Problem is, that under cygwin in Windows 7, I got nil, if number contains . insetad of ,. How to solve this ?
n = tonumber("7.5") -> gives nil
n = tonumber("7,5") -> gives 7.5
s = "7.5"; n = tonumber((s:gsub("[.,]",tostring(1.5):sub(2,2))))- Egor Skriptunoff