Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Common/ListFileUtils.cpp')
-rwxr-xr-xCommon/ListFileUtils.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Common/ListFileUtils.cpp b/Common/ListFileUtils.cpp
index e4370f48..ea4cde38 100755
--- a/Common/ListFileUtils.cpp
+++ b/Common/ListFileUtils.cpp
@@ -15,8 +15,7 @@ static void RemoveQuote(UString &s)
s = s.Mid(1, s.Length() - 2);
}
-bool ReadNamesFromListFile(LPCTSTR fileName, UStringVector &resultStrings,
- UINT codePage)
+bool ReadNamesFromListFile(LPCTSTR fileName, UStringVector &resultStrings, UINT codePage)
{
CStdInStream file;
if (!file.Open(fileName))
@@ -32,6 +31,12 @@ bool ReadNamesFromListFile(LPCTSTR fileName, UStringVector &resultStrings,
}
else
u = MultiByteToUnicodeString(s, codePage);
+ if (!u.IsEmpty())
+ {
+ if (u[0] == 0xFEFF)
+ u.Delete(0);
+ }
+
UString t;
for(int i = 0; i < u.Length(); i++)
{