From: Ashok N. <apn...@ya...> - 2025-05-06 07:47:46
|
Jan, It occurs to me that 9.1 will stop supporting Windows releases prior to Win 10. Given that, we can simply drop support for MinGW/MSVCRT as all Windows systems will have UCRT installed. If that is agreeable, we can drop the discussion around MSVCRT and focus on other points of contention in 716/718. /Ashok ________________________________ From: Ashok Nadkarni via Tcl-Core Sent: Tuesday, May 6, 2025 10:17 AM To: Jan Nijtmans Cc: Tcl Core List Subject: Re: [TCLCORE] TIP 716 ready for comments No, I'm afraid your post below does not clarify at all. That link you gave pertains to UCRT, not MSVCRT which, unless I read with my blinders on, is not mentioned anywhere on that page. Adding UCRT to the discussion, first with passing of FILE* between runtimes, and now to discussion of setlocale(), only serves to obfuscate further. Further, given the link you gave has no discussion of MSVCRT, what was the source of your statement <MSVCRT supports the "utf-8" _encoding_, not the "utf-8" _locale_,> ? If you can provide the basis for your conclusion, that would really help. /Ashok ________________________________ From: Jan Nijtmans Sent: Tuesday, May 6, 2025 3:08 AM To: Ashok Nadkarni Cc: Tcl Core List Subject: Re: [TCLCORE] TIP 716 ready for comments Op ma 5 mei 2025 om 19:22 schreef Ashok Nadkarni: > Now, with regard to the mingw msvcrt comment... > > It seems to me from your comment about GetACP() in MingW that you think I was suggesting the manifest would not work in MingW. That is not so. GetACP() will work the same way and return utf-8 in the presence of a manifest but the problem is MSVCRT does not support UTF-8. > > I do not know if you read the link that I had referenced in the TIP https://www.msys2.org/docs/environments/#msvcrt-vs-ucrt > > To quote from there - It doesn't support the UTF-8 locale ("It" being MSVCRT) > > When the official release document says MSVCRT does not support UTF-8, I take that at face value. Let me clarify then. See: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170 With msvcrt, you cannot do a setlocale("en_US.UTF8"), with UCRT it works; Tcl doesn't support that either. The only setlocale() call is here: <https://core.tcl-lang.org/tcl/file?name=win/tclAppInit.c&ci=ead995eddf5fff98&ln=111> MSVCRT supports the "utf-8" _encoding_, not the "utf-8" _locale_, that's a different thing Hope this clarifies enough. Happy hacking, Jan Nijtmans |