Author |
Topic: PriceToString StringToPrice round-tripping with comma decimal (4 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
We have a customer in Europe who's computer is set to their expected locale with the comma as a decimal. We have found that the PriceToString and StringToPrice functions do not round-trip the same values when working with contracts that have a fractional format, like grain options (eg "OZCF3 C7,4")
Given the following C++ code:
These are our outputs: string {"0.06 7" (1)} _bstr_t See how the value increases from 0.06 to 600.00. We can attempt to correct for this by replacing the decimal with a comma:
When we work with non-fractional values this drift does not happen. Also we find it interesting that while the parsing expects a comma, the string formatting does not produce one. |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
We will check it, thank you!
Victor Vins Lead Software Developer |
||||
jlanawalt Posts: 88 Joined: Feb 12, 2009 |
Do you imagine it would be a server-side or client library fix? We can code a work-around but would like to have some idea if a fix will cause our work-around to cause problems requiring another update on our end.
Thank you, |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
It will be a client-side update
Victor Vins Lead Software Developer |
||||