What is state of the art: Unicode file names on Windows

FYI, since Windows10 May 2019 Update, the process code page can be set to UTF-8 in the application manifest.

We can use plain fopen API with UTF-8 file names on Windows the same way as on Mac and Linux. There is no need to convert filenames to UTF-16 (WCHAR) and use _wfopen anymore or use vtksys::SystemTools::Fopen. This is convenient because we don’t need to make hundreds of changes in VTK and invasive patches in third-party libraries.

I’ve tested it and works well. I only had to add the manifest file to the list of source files in CMake add_executable (in CTK, I’ve added add_executable_utf8 macro for this).

1 Like