OLEAUT32: Single|Double->BSTR conversion must always use locale

a_villacis at palosanto.com a_villacis at palosanto.com
Mon Apr 11 12:21:11 CDT 2005


Yet another patch for a problem in MP3GainGUI.exe: This VB
program saves its GUI state (including the column widths of a
Listview control) in the registry, and restores it on startup.
All fine, except that in a locale other than en_US, the column
widths (of type Single) are converted to strings using the US
locale, and are later restored with the current locale (in my
case, es_EC). For example, a value such as 123.456 (one hundred
and twenty-three with four hundred and fifty-six thousandths) is
converted to the string \"123.456\", and is then parsed according
to the rules for the current locale. For es_EC, the string
\"123.456\" reads \"one hundred and twenty-three thousand four
hundred and fifty-six\", and the columns get set to a
ridiculously large width. Native oleaut32 converts to \"123,456\"
even under Wine with no special flags, so this patch changes the
real->bstr conversion to do the same. I know this patch breaks a
couple of tests for vartype (because \"1\" gets converted to
\"1.00\" and such), so I will investigate the issue and possibly
send a more correct patch. In the meantime, comments are welcome.

Changelog:
* Force Single|Double conversion to BSTR to always use current
locale


------------------------------------------------------------------------
Mail enviado desde PortalMail 1.4.2 Web based email system.
PaloSanto Solutions, Sunnyvale CA.
http://www.palosanto.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-vartype-always_use_locale.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050411/47c3cc53/wine-oleaut32-vartype-always_use_locale.bin


More information about the wine-patches mailing list