Monday, January 5, 2015

Open file with Unicode name

It turns out to be rather simple ...


void f(wchar_t const*p){
char l[0x1000];
memset(l,0,0x1000);
wcstombs(l,p,0xFFF);
FILE*F=fopen(l,"rb");/*Open normally .. =D */

/*Et cetera ... */
fclose(F);/*Remember to close*/
}

No comments:

Post a Comment