From 1507978ea61aacf5c73378014711558bf4bca502 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Mar 2014 11:11:53 +0000 Subject: rest of codepages removed git-svn-id: http://svn.miranda-ng.org/main/trunk@8775 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/langpack.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/mir_core') diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index 018812b773..5f1e0709fe 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -226,15 +226,10 @@ static void LoadLangPackFile(FILE *fp, char *line) line[0] = 0; fgets(line, LANGPACK_BUF_SIZE, fp); - UINT fileCp = CP_ACP; - if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf') { - fileCp = CP_UTF8; + if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf') fseek(fp, 3, SEEK_SET); - } - else { - fileCp = langPack.codepage; + else fseek(fp, 0, SEEK_SET); - } LoadLangPackFile(fp, line); fclose(fp); @@ -435,12 +430,9 @@ MIR_CORE_DLL(int) LoadLangPackDescr(const TCHAR *ptszLangPack, LANGPACK_INFO *lp char line[LANGPACK_BUF_SIZE] = ""; int startOfLine = 0; - if (LoadLangDescr(*lpInfo, fp, line, startOfLine)) { - fclose(fp); - return 1; - } - - return 0; + int res = LoadLangDescr(*lpInfo, fp, line, startOfLine); + fclose(fp); + return res; } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3