open_file return -100009 : when path contains french e accent

Hello,
I use a small experimental program with Libraw and Windows 10
Thanks a lot for all the job done !
All worked well with 0.20.2 release and previous also.

When i upgraded for the 0.21.2 release i got an error -100009 for the method "open_file" :

wchar_t* array = new wchar_t[length + 1]
//....
int ret = this->processor->open_file( array ) ;
// ret is -100009

The new method open_file as a wchar_t as parameter : the previous worked well with a char *.
I tried various conversions to get a wchar_t as input : still the same error returned.
This is because path name acn contain an e accent (Latin set )

Question : is there a way to modify the Libraw.h where various #def can switch between :
open_file( wchar_t...) and previous open_file( char *...) ?
Or another simple solution for Windows 64 bits to work as before : with Latin pathnames ?

Thanks a lot for your answer.

Luciano

Forums: 

>> I tried various

>> I tried various conversions

The wchar_t* string is passed directly to Win32/CreateFileW

So, if you're able to use other Win32 file API calls, it should work for LibRaw too.

UPD: on modern windows, all interfaces are unicode already, starting from wmain/_tmain program 1st function, so there is no need to convert anything from/to 8-bit strings.

-- Alex Tutubalin @LibRaw LLC

Hello Alex !

Hello Alex !
Thank you for your help.

To make my project LibRaw work (QT / Windows 10) with last release Libraw 0.21.2 and Unicode,
i added these 3 lines in the file libraw.h before compiling Librairy.

# define LIBRAW_WIN32_CALLS
# define __INTEL_COMPILER
# define LIBRAW_WIN32_UNICODEPATHS

May be one or two #define are required for my computer.
So i can open Raw file with a filename QString (16bits)

const wchar_t *array = (const wchar_t*)filename.utf16();
int ret = this->processor->open_file( array) ;
if( ret != LIBRAW_SUCCESS )
return false ;

Best regards,

Luciano

LucianoP