FileRead is problematic on unicode, just document it for now and hope we can fix it later...

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6214 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2012-02-24 15:25:55 +00:00
parent bc9f86d506
commit 2c89cca183
4 changed files with 31 additions and 6 deletions

View file

@ -1417,9 +1417,13 @@ static int NSISCALL ExecuteEntry(entry *entry_)
#ifdef _UNICODE
if (which==EW_FGETS)
{
/* BUGBUG:
How is MBTWC supposed to be able to determine the correct WCHAR for a multibyte string when it only has 1 byte to look at?
And what if the multibyte character needs two WCHARs?
*/
char tmpc;
if (!ReadFile(h,&tmpc,1,&dw,NULL) || dw != 1) break;
MultiByteToWideChar(CP_ACP, 0, &tmpc, 1, &c, 1);
if (0==MultiByteToWideChar(CP_ACP, 0, &tmpc, 1, &c, 1)) c = _T('?');
}
else
#endif