Maybe what ought to happen is that you write some kind of shim library that has all the C standard library functions in it-- open, fopen, etc. You have some code in the shim library that translates all the UTF8 filenames to UCS-16 or whatever Windows is using. Then you rebuild all the libraries you're using against this shim library.
Of course, this approach basically forces you to bundle all your libraries with your application. But I was under the impression that this was standard operating procedure on Windows anyway, because some evil guy could overwrite your shared copy of the shared library with an older version, etc.
Does that make sense at all? I've never developed on Windows, so it might be nonsense.
Posted Feb 4, 2012 0:15 UTC (Sat) by cortana (subscriber, #24596)
[Link]
It can work and it's one way to do it. You will run into problems if you need to use a DLL that isn't linked against your replacement library itself though (think binary-only third-party DLLs).