OSDN Git Service

multiformatText.cpp: Fix Unpacker plugin not working properly when the selected custo...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 8 Jul 2017 04:27:29 +0000 (13:27 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 8 Jul 2017 04:27:29 +0000 (13:27 +0900)
Src/Common/multiformatText.cpp

index 4c1cdec..292b7cf 100644 (file)
@@ -87,8 +87,10 @@ void storageForPlugins::SetDataFileEncoding(const String& filename, FileTextEnco
        m_filename = filename;
        m_nChangedValid = 0;
        m_nChanged = 0;
-       m_bOriginalIsUnicode = encoding.m_unicoding ? true : false;
-       m_bCurrentIsUnicode = encoding.m_unicoding ? true : false;
+       if (encoding.m_unicoding != ucr::NONE && encoding.m_unicoding != ucr::UTF8)
+               m_bOriginalIsUnicode = m_bCurrentIsUnicode = true;
+       else
+               m_bOriginalIsUnicode = m_bCurrentIsUnicode = false;
        m_bCurrentIsFile = true;
        m_bOverwriteSourceFile = bOverwrite;
        m_codepage = encoding.m_codepage;