Minor Unicode fixes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6345 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
eaa6991b91
commit
e8ac52b908
3 changed files with 8 additions and 6 deletions
|
@ -36,11 +36,13 @@ UINT StrLenUTF16(const void*str)
|
|||
|
||||
bool StrSetUTF16LE(tstring&dest, const void*src)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
dest = (wchar_t*) src;
|
||||
#else
|
||||
#error TODO: UTF16LE to wchar_t
|
||||
#ifndef _WIN32
|
||||
CharEncConv cec;
|
||||
if (!cec.Initialize(-1,NStreamEncoding::UTF16LE)) return false;
|
||||
src = (const void*) cec.Convert(src);
|
||||
if (!src) return false;
|
||||
#endif
|
||||
try { dest = (wchar_t*) src; } catch(...) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue