Hi! I have unicode MFC application.
char strSendFilePath[MAX_FILE_PATH] = {ZERO_VAL};
wcstombs(strSendFilePath, strSendTextPath.GetBuffer(strSendTextPath.GetLength()), strSendTextPath.GetLength());
strSendTextPath.ReleaseBuffer();
FILE *fpRead;
const int l_size = CHUNK_SIZE;
char file_buffer[l_size];
if((fpRead = fopen(strSendFilePath, "rb")) == NULL)
{
AfxMessageBox(IDS_FILE_NOTOPEN);
return FALSE;
}
It is working fine, if the folder path or file path like this: C:\Documents and Settings\user\My Documents\Downloads\Sample.txt
If suppose folder path in japanese,
C:\Documents and Settings\user\My Documents\Downloads\おはようございます\Sample.txt
then fopen is failed.
please do the needful.
Thanks much
Sam.