https://bugs.winehq.org/show_bug.cgi?id=51450
Bug ID: 51450 Summary: oleaut32:varformat fails in Wine when the currency sign follows the amount Product: Wine Version: 6.10 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: oleaut32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
oleaut32:varformat fails in Wine when the currency sign follows the amount. For instance in French:
https://test.winehq.org/data/patterns.html#oleaut32:varformat
varformat.c:641: str=L"0,000 \20ac" varformat.c:643: Test failed: Unexpected hr 0x80020005.
There are two reasons for this failure: * VarParseNumFromStr() expects the currency sign to precede the monetary amount. This is not how it works in most European languages such as French, German, Swiss, etc. * VarParseNumFromStr() normally does not allow spaces between the monetary amount and the currency sign. However in French the thousands separator is a non-breaking space and that's a special case that also allows regular spaces. So, because in this case VarParseNumFromStr() is called with NUMPRS_THOUSANDS, it should ignore that space and successfully parse the trailing currency sign.
I will send a patch shortly.
https://bugs.winehq.org/show_bug.cgi?id=51450
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |fgouget@codeweavers.com Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=51450
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |e02a7e579cc48079d70f2ef0095 | |7255d28d119d6
--- Comment #1 from François Gouget fgouget@codeweavers.com --- The failure in varformat is fixed:
commit e02a7e579cc48079d70f2ef00957255d28d119d6 Author: Francois Gouget fgouget@codeweavers.com AuthorDate: Tue Jul 20 14:02:12 2021 +0200
oleaut32: VarParseNumFromStr() accepts trailing currency symbols.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51450 Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
I'm a bit surprised that the (regular) space between the amount and the currency symbol is not causing trouble here. Maybe it's because VarFormatCurrency() ends up using NUMPRS_STD which includes NUMPRS_TRAILING_WHITE (but the space is not trailing), or because NUMPRS_THOUSANDS (though as far as I know that only matches non-breaking spaces in Wine currently).
https://bugs.winehq.org/show_bug.cgi?id=51450
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.14.