Default language file codepage is only ASCII compatible (Bug #1180)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6848 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2017-04-14 14:17:39 +00:00
parent 2035f5e5a5
commit 062a89273c
76 changed files with 82 additions and 81 deletions

View file

@ -1036,7 +1036,7 @@ l_readerr:
// Get code page
bool isnlfdataucp = false; // Unicode-only language?
nlf->m_uCodePage = CP_ACP;
nlf->m_uCodePage = NSISRT_GetASCIICodepage();
if (!GetNextNLFLine(lr, buf, NSIS_MAX_STRLEN, errlr)) goto l_readerr;
TrimTrailingNewlines(buf);
if (buf[0] != _T('-') || buf[1] != 0) {

View file

@ -222,7 +222,7 @@ bool NSISRT_Initialize() // Init function for POSIX
create_code_page_string(g_nrt_iconv_narrowloc, cchmax, CP_UTF8);
}
}
return !!nsis_iconv_get_host_endian_ucs4_code();
return nsis_iconv_get_host_endian_ucs4_code() && IsValidCodePage(NSISRT_GetASCIICodepage());
}
const char* NSISRT_setlocale_wincp(int cat, unsigned int cp)

View file

@ -169,6 +169,7 @@ inline void PrintColorFmtMsg_ERR(const TCHAR *fmtstr, ...)
bool NSISRT_Initialize();
#define NSISRT_GetASCIICodepage() ( 1252 )
#ifndef _WIN32
// iconv const inconsistency workaround by Alexandre Oliva
template <typename T>