More progress on the locale bug
My first approach to a fix, which was to cast the variable value to a number whenever using it, failed; the user reported no difference. This morning, I installed an Italian locale on Ubuntu, and tested the IMT there, but didn't see any difference at all; everything works fine for me. This suggests that the problem was in the locale for Wine itself, rather than for Ubuntu.
This sent me back to the IMT code, and it turned out that I was generating the value for the XSL variable using Delphi's FloatToStr
function, which uses the system locale. That looks like the cause of the problem, so I've changed that call; I now set the DecimalSeparator specifically, and then use FloatToStrF(ScaleFactor, ffGeneral, 6, 2)
, which should give a result with a period for a separator on any locale. I'm now waiting for the user to report back on whether this works or not, because I haven't been able to create a test system that reproduces the problem so far.