-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.2, 4.5.3
-
None
-
ae576ea123d0625eceb9904e2039b2183cb82a0b
The postgresql driver plugin distributed with the official Qt 4.5.2 and 4.5.3 release uses the strtod(val) function from libc to convert the result strings to double.
Under current linux distributions (Mandriva 2009.1 or Suse 11.1 or 11.2RC1) this function uses the decimal separator from the current local to execute the conversion.
In case of locales (ex. german or hungarian locales) which use comma (',') as the decimal separator, the double values will be truncated.
This problem can be corrected by replacing strtod(val) to QString::fromAscii(val).toDouble() in qsql_psql.cpp, which uses dot ('.') as decimal separator in every locale.
I attached the modified source code, too. The modification is marked by a conditional compiling directive: #ifdef DANI
This problem currently not effects the win32 version of the plugin compiled by mingw32.
Under Mac-OSX, I haven't tested the plugin.