UTF-8 support for SetFont and .nlf font name in ansi build
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6206 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4d94e1ae8a
commit
e57b4c5a67
5 changed files with 73 additions and 19 deletions
|
@ -37,7 +37,7 @@ static EXEHEADWCHAR_T* ExeHeadWStrAlloc(UINT cch)
|
|||
#ifdef _UNICODE
|
||||
#else // !_UNICODE
|
||||
|
||||
EXEHEADTCHAR_T* UTF8ToExeHeadTStr(LPCSTR StrU8,UINT Codepage)
|
||||
EXEHEADTCHAR_T* UTF8ToExeHeadTStrDup(LPCSTR StrU8,UINT Codepage)
|
||||
{
|
||||
int cchW = MultiByteToWideChar(CP_UTF8,UTF8MBTWCFLAGS,StrU8,-1,NULL,0);
|
||||
if (!cchW) return NULL;
|
||||
|
@ -51,7 +51,7 @@ EXEHEADTCHAR_T* UTF8ToExeHeadTStr(LPCSTR StrU8,UINT Codepage)
|
|||
{
|
||||
if (!WideCharToMultiByte(Codepage,0,bufWStr,cchW,outstr,cbA,NULL,NULL))
|
||||
{
|
||||
ExeHeadTStrFree(outstr);
|
||||
free(outstr);
|
||||
outstr = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue