Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: "Haifang Wang (Centific Technologies Inc)" <v-haiwang@microsoft.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-05-13T22:47:23Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Reject non-ASCII locale names.
- ce17de580f90 16.5 landed
- 9c7acc33307b 17.1 landed
- adbb27ac89e0 18.0 landed
On Tue, May 14, 2024 at 10:27 AM Haifang Wang (Centific Technologies Inc) <v-haiwang@microsoft.com> wrote: > Thanks for your reply. But I'm not sure if there is any miscommunication. Let me make it clear again. (Sorry, it seems our emails crossed.) > I’m a program manager in the Windows App Assure ISV Outreach Team at Microsoft. We work with Microsoft’s test organization to notify developers when issues have been identified in their applications. The issue I reported in this mail is an issue we found in our testing and I believe it also impact a lot of end users. Like you mentioned previously, it is caused by recent operating system upgrade. Thanks for doing that, and yes, it affects a lot of users, and this is not the first time. It is still possible for it to be the last... > The solution I shared in my last email was suggested our engineers. It would be great is you could use _wsetlocale API. this is what the recommended way as par Microsoft documentation as well. (Reference: setlocale wsetlocale: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170 I don't understand. Can you explain why _wsetlocale() is better than setlocale()? They behave identically except one takes wide characters, which doesn't seem to solve any problem we have. > If you don’t want to change the API to update their mapping table with Turkish_Tur in case of Turkish_Türkiye as you have done for others locale with same issue as well in your code (reference PostgreSQL Source Code: src/port/win32setlocale.c Source File: https://doxygen.postgresql.org/win32setlocale_8c_source.html, Line number 66-67). Yeah, OK we could put more kludges into win32setlocale.c. I don't mind committing a patch like that if it addresses the issue. I am not in a position to confirm that myself... what we need is someone who works with Windows to write the patch and test it across that upgrade. Longer term I'm looking for something better than that though, because it doesn't address the root cause (need for stable identifiers), and will only ever allow us to fix problems with the old unstable names *after* users complain that their database is dead, 3-6 months after in fact due to release cycles. I think a dynamic mapping file might be better? (Maybe win32locale.c should be able to read that kludge table from a file that you can give it with an environment variable, or something like that?)