Bug #18589 2012-04-24 10:32

frithjofh

loacle of the OS interfers with code generation

If the current OS is set to a locale different from English or "C" the Codef() function in wxitem .cpp line 795, in its switch case dealing with generating string representation of a double value, can lead to wrong results.

The particular switch case converts a double into a wxString using the << operator which is locale dependent. The resulting decimal separator symbol should always be "." in the generated code. In some locale though, the decimal separator is a comma, leading to a non valid string representation in the generated code text.

In the result the code will not compile, complaining about arguments being two int instead of one double. Case: wxSplitterWindow and its SetSashGravity function expecting one double in the range of 0.0 to 1.0. This value, on some locales, gets parsed as 1,5 for instance and is then interpreted as a list of two comma separated arguments of type int.

Category
Plugin::wxSmith
Group
Platform:Linux
Status
Closed
Close date
2013-06-12 08:20
Assigned to
 
frithjofh 2012-04-24 12:14

build svn7939 on SuSE 12.1 x86_64

biplab 2013-06-12 08:20

This bug has been already fixed in HEAD.

Thank you.