Rawspeed: Opening files with non-ASCII filename fails on Windows
Same as #11630
I did not test, but i'm also pretty sure that is still the case
#5 Updated by Roman Lebedev over 2 years ago
Tobias Ellinghaus wrote:
From seeing what is suggested or used elsewhere I'd say the proper fix would be an
#ifdef to use _wfopen() on Windows and fopen() elsewhere
Currently it is already an #ifdef, but instead, on windows, CreateFile is used to open.
and document that on Windows the filename has to be utf8 encoded.
#7 Updated by Peter Budai over 2 years ago
There are basically two options IMHO:
1) you can use the MS CRT _wfopen(), as houz suggested. You can look at how glib does it (also with #ifdef):
2) You can go with Windows API CreateFileW() - as current RS code is apparently using Windows API, that might be less intrusive.
For converting utf8 to wide, you can also check the glib way:
The 1) has some limitations like max 500 files can be opened at a time, no rename on open files etc, I'm not sure whether it is an issue for RS. The 2) is more versatile from that point of view, but I guess a little bit more work.
#8 Updated by Roman Lebedev about 2 years ago
- % Done changed from 20 to 100
- Status changed from Triaged to Fixed
Applied in changeset darktable|4aea69e36bbde753f546651d164c729fb07b2b3e.