WinSCP uses Windows
Wow, that's crazy. Microsoft indeed uses StrCmpLogicalW in Explorer in Windows 10. And it produces very funky results.
The issue is that on Linux, say scandir() doesn't use that weird sorting by default. So if someone uses WinSCP to connect to a Linux file system they will get very inconsistent results because of this weird Windows-centric sorting.
PS. BTW, Microsoft themselves recommend to use a totally different set of APIs for sorting, i.e CompareStringOrdinal for NTFS file names.