From b397ed9ad5b2448bf75b516a1c758522eeac47f7 Mon Sep 17 00:00:00 2001 From: wizou Date: Fri, 28 May 2010 13:27:30 +0000 Subject: [PATCH] Unicode port: Generate Unicode LangStrings even if source was an ANSI file git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6094 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/lang.cpp | 2 +- Source/tstring.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/lang.cpp b/Source/lang.cpp index a76fe6e5..a3cf4e97 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -1016,7 +1016,7 @@ LanguageTable * CEXEBuild::LoadLangFile(TCHAR *filename) { } #ifdef _UNICODE - if (!unicode) // convert font name from ANSI to Unicode now that we know the language codepage + if (!unicode && nlf->m_szFont) // convert font name from ANSI to Unicode now that we know the language codepage { TCHAR* str = nlf->m_szFont; nlf->m_szFont = _tcsdup(CtoTString2(TtoCString(str),table->nlf.m_uCodePage)); diff --git a/Source/tstring.h b/Source/tstring.h index bea3a5d2..8dcb6842 100644 --- a/Source/tstring.h +++ b/Source/tstring.h @@ -38,7 +38,7 @@ typedef std::ofstream tofstream; typedef std::ifstream tifstream; // Use the following macros to open text files. #define FOPENTEXT(file, mode) fopen(file, mode) -#define FOPENTEXT2(file, mode, unicode) *unicode=FALSE, fopen(file, mode) +#define FOPENTEXT2(file, mode, unicode) (*unicode=FALSE, fopen(file, mode)) #endif #ifndef _UNICODE