[Bug 54565] New: riched20:richole - subtest_InsertObject() fails in the Hindi locale on Windows
https://bugs.winehq.org/show_bug.cgi?id=54565 Bug ID: 54565 Summary: riched20:richole - subtest_InsertObject() fails in the Hindi locale on Windows Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: richedit Assignee: wine-bugs(a)winehq.org Reporter: fgouget(a)codeweavers.com riched20:richole - subtest_InsertObject() fails in the Hindi locale on Windows: richole.c:4072: Test failed: Got wrong length: 0. richole.c:4073: Test failed: Got wrong content: . richole.c:4155: Test failed: Got wrong length: 0. richole.c:4156: Test failed: Got wrong content: . richole.c:4072: Test failed: Got wrong length: 0. richole.c:4073: Test failed: Got wrong content: . richole.c:4155: Test failed: Got wrong length: 0. richole.c:4156: Test failed: Got wrong content: . See https://test.winehq.org/data/patterns.html#riched20:richole These failures only happen in the Hindi and Hindi + UTF-8 locales. What happens is that the test ends up inserting 'object replacement characters' into the test string (\fffb), then selects the whole string and tries to retrieve it with EM_GETSELTEXT. In all locales the \fffb characters get replaced with spaces (or lookalike), but not in Hindi. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs(a)winehq.org |fgouget(a)codeweavers.com Keywords| |source, testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 --- Comment #1 from François Gouget <fgouget(a)codeweavers.com> --- No matter the locale, WideCharToMultiByte() has no trouble converting the \fffb character to either the replacement character, or to the right UTF-8 equivalent. But EM_GETSELTEXT has trouble with this character (and others in the \ffxx range). Already in the en_AE + UTF-8 locale one gets: "\xfffb" -> "" "\xfffb\xfffb" -> " " "a\xfffb" -> "a" "a\xfffb""b" -> "a " "\xfffb""b" -> " " But in Hindi there's only one result: "" + ERROR_INVALID_PARAMETER. It's not clear why but Windows' EM_GETSELTEXT implementation is clearly broken in some locales. Fortunately that can be detected by checking GetLastError(). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 Jactry Zeng <jactry92(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jactry92(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 --- Comment #2 from François Gouget <fgouget(a)codeweavers.com> --- I sent a merge request to fix these failures: https://gitlab.winehq.org/wine/wine/-/merge_requests/2276 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 --- Comment #3 from François Gouget <fgouget(a)codeweavers.com> --- We also have: "a" -> "" It's as if EM_GETSELTEXT is losing the last character. But in the richole failure case it's the whole string that gets lost. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |37cd13abdf5d91c7b3f25b39fa1 | |4976bc3a3e3a3 --- Comment #4 from François Gouget <fgouget(a)codeweavers.com> --- This got fixed by the commit below: commit 37cd13abdf5d91c7b3f25b39fa14976bc3a3e3a3 Author: François Gouget <fgouget(a)codeweavers.com> AuthorDate: Fri Feb 24 02:03:41 2023 +0100 riched20/tests: Fix the EM_GETSELTEXT tests in Hindi on Windows. On Windows EM_GETSELTEXT fails with an invalid parameter error in the Hindi locale but works in most other locales, including UTF-8 ones. So check for this issue and adjust the expected results accordingly. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54559 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54565 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54565 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 8.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla