setlocale(LC_ALL, \"uk-UA\")
sometimes hangs/deadlocks for me with unknown reason. Call stack is:
ntdll.dll!_ZwWaitForSingleObject@12() Unknown
nt
This was a bug in the TH1 build (10.0.10240) of the Universal CRT. The bug was fixed in the Windows 10 November Update (TH2) build (10.0.10586).
You can download and install the updated Windows 10 SDK from https://dev.windows.com/en-us/downloads/windows-10-sdk. This SDK contains the static Universal CRT libraries, the debug Universal CRT DLLs (ucrtbased.dll et al.), and the retail Universal CRT DLLs for app-local redistribution.
You can download the updated Universal CRT redistributables from https://www.microsoft.com/en-us/download/details.aspx?id=50410. These contain the updated retail Universal CRT for central deployment in the system directory.