diff --git a/Build/Notepad3.ini b/Build/Notepad3.ini
index ff117a305..32504ec7f 100644
Binary files a/Build/Notepad3.ini and b/Build/Notepad3.ini differ
diff --git a/Versions/build.txt b/Versions/build.txt
index 987568c77..e64e5f2b7 100644
--- a/Versions/build.txt
+++ b/Versions/build.txt
@@ -1 +1 @@
-1688
+1689
diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf
index 27e0e4fc0..50cacd161 100644
--- a/res/Notepad3.exe.manifest.conf
+++ b/res/Notepad3.exe.manifest.conf
@@ -3,7 +3,7 @@
Notepad3 RC
diff --git a/src/EncodingDetection.cpp b/src/EncodingDetection.cpp
index c20a57c61..a3dbe433d 100644
--- a/src/EncodingDetection.cpp
+++ b/src/EncodingDetection.cpp
@@ -30,6 +30,7 @@
#define STRSAFE_NO_CB_FUNCTIONS
#define STRSAFE_NO_DEPRECATE // don't allow deprecated functions
#include
+#include
//~#include // async detection
@@ -51,8 +52,8 @@ extern "C" {
static char chEncodingInfo[MAX_PATH] = { '\0' };
static WCHAR wchEncodingInfo[MAX_PATH] = { L'\0' };
-static void _SetEncodingTitleInfo(const char* encodingUCD, cpi_enc_t encUCD, float ucd_confidence,
- const char* encodingCED, cpi_enc_t encCED, float ced_confidence);
+static void _SetEncodingTitleInfo(const char* encodingUCD, cpi_enc_t encUCD, float ucd_confidence);
+ //~,const char* encodingCED, cpi_enc_t encCED, float ced_confidence);
extern "C" const char* Encoding_GetTitleInfoA() { return chEncodingInfo; }
extern "C" const WCHAR* Encoding_GetTitleInfoW() { return wchEncodingInfo; }
@@ -570,6 +571,7 @@ constexpr cpi_enc_t _MapStdEncodingString2CPI(const char* encStrg, float* pConfi
// ============================================================================
+#if FALSE
// ============================================================================
// CED (Compact Encoding Detector)
// ============================================================================
@@ -617,7 +619,7 @@ cpi_enc_t AnalyzeText_CED
return cpiEncoding;
}
// ============================================================================
-
+#endif
// ============================================================================
@@ -681,7 +683,8 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
{
if (len == 0)
{
- _SetEncodingTitleInfo("", CPI_NONE, 0.0f, "", CPI_NONE, 0.0f);
+ //~_SetEncodingTitleInfo("", CPI_NONE, 0.0f, "", CPI_NONE, 0.0f);
+ _SetEncodingTitleInfo("", CPI_NONE, 0.0f);
*confidence_io = 0.0f;
return CPI_NONE;
}
@@ -692,9 +695,9 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
char encodingStrg_UCD[MAX_ENC_STRG_LEN] = { '\0' };
cpi_enc_t cpiEncoding_UCD = CPI_NONE;
- float ced_cnf = 0.0f;
- char encodingStrg_CED[MAX_ENC_STRG_LEN] = { '\0' };
- cpi_enc_t cpiEncoding_CED = CPI_NONE;
+ //~float ced_cnf = 0.0f;
+ //~char encodingStrg_CED[MAX_ENC_STRG_LEN] = { '\0' };
+ //~cpi_enc_t cpiEncoding_CED = CPI_NONE;
#if FALSE
size_t const largeFile = static_cast(Settings2.FileLoadWarningMB) * 1024LL * 1024LL;
@@ -720,29 +723,29 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
#else
// no need to run analyzers asynchrony, cause they analyze only the first KB of large files ...
- cpiEncoding_CED = AnalyzeText_CED(text, len, encodingHint, &ced_cnf, encodingStrg_CED, MAX_ENC_STRG_LEN);
- if (ced_cnf < 1.0f)
- {
+ //~cpiEncoding_CED = AnalyzeText_CED(text, len, encodingHint, &ced_cnf, encodingStrg_CED, MAX_ENC_STRG_LEN);
+ //~if (ced_cnf < 1.0f)
+ //~{
cpiEncoding_UCD = AnalyzeText_UCHARDET(text, len, encodingHint, &ucd_cnf, encodingStrg_UCD, MAX_ENC_STRG_LEN);
- }
- else {
- cpiEncoding_UCD = CPI_NONE;
- ucd_cnf = 1.0f;
- }
+ //~}
+ //~else {
+ //~ cpiEncoding_UCD = CPI_NONE;
+ //~ ucd_cnf = 1.0f;
+ //~}
#endif
float confidence = 0.0f;
float const ucd_confidence = ucd_cnf;
- float const ced_confidence = ced_cnf;
+ //~float const ced_confidence = ced_cnf;
UINT const codePage_UCD = Encoding_GetCodePage(cpiEncoding_UCD);
- UINT const codePage_CED = Encoding_GetCodePage(cpiEncoding_CED);
+ //~UINT const codePage_CED = Encoding_GetCodePage(cpiEncoding_CED);
if (Flags.bDevDebugMode)
{
- _SetEncodingTitleInfo(encodingStrg_UCD, cpiEncoding_UCD, ucd_confidence,
- encodingStrg_CED, cpiEncoding_CED, ced_confidence);
+ _SetEncodingTitleInfo(encodingStrg_UCD, cpiEncoding_UCD, ucd_confidence);
+ //~encodingStrg_CED, cpiEncoding_CED, ced_confidence);
}
// --- re-mapping UCD ----
@@ -767,7 +770,7 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
}
// --- re-mapping CED ----
-
+ /* ~~~
switch (codePage_CED)
{
case 20936: // Map old GB2312 -> GBK
@@ -781,13 +784,16 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
default:
break;
}
+ ~~~ */
// --------------------------------------------------------------------------
// vote for encoding prognosis based on confidence levels or reliability
// --------------------------------------------------------------------------
- cpi_enc_t iAnalyzedEncoding = CPI_NONE;
+ cpi_enc_t iAnalyzedEncoding = cpiEncoding_UCD;
+ confidence = ucd_confidence;
+ /* ~~~
if ((cpiEncoding_UCD == cpiEncoding_CED) && !Encoding_IsNONE(cpiEncoding_UCD))
{
iAnalyzedEncoding = cpiEncoding_UCD;
@@ -816,6 +822,7 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
}
}
}
+ ~~~ */
*confidence_io = confidence;
return iAnalyzedEncoding;
@@ -828,8 +835,8 @@ extern "C" cpi_enc_t Encoding_AnalyzeText
//
// _SetEncodingTitleInfo()
//
-static void _SetEncodingTitleInfo(const char* encodingUCD, cpi_enc_t encUCD, float ucd_confidence,
- const char* encodingCED, cpi_enc_t encCED, float ced_confidence)
+static void _SetEncodingTitleInfo(const char* encodingUCD, cpi_enc_t encUCD, float ucd_confidence)
+ //~,const char* encodingCED, cpi_enc_t encCED, float ced_confidence)
{
char tmpBuf[128] = { '\0' };
@@ -842,30 +849,33 @@ static void _SetEncodingTitleInfo(const char* encodingUCD, cpi_enc_t encUCD, flo
const char* ukn = (!encodingUCD || (encodingUCD[0] == '\0')) ? "" : encodingUCD;
StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), (encUCD == CPI_ASCII_7BIT) ? "ASCII" : ukn);
}
- StringCchPrintfA(tmpBuf, 128, "' Conf=%.0f%%", ucd_confidence * 100.0f);
+ float const ucd_conf_perc = ucd_confidence * 100.0f;
+ StringCchPrintfA(tmpBuf, 128, "' Conf=%.0f%%", ucd_conf_perc);
StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), tmpBuf);
- StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), " || CED='");
- if (encCED >= 0)
- {
- //WideCharToMultiByte(CP_UTF7, 0, Encoding_GetLabel(encCED), -1, chEncodingLabel, ARRAYSIZE(chEncodingLabel), 0, 0);
- StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), encodingCED);
- }
- else {
- StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), (encCED == CPI_ASCII_7BIT) ? "ASCII" : "");
- }
- if ((encCED >= 0) || (encCED == CPI_ASCII_7BIT)) {
- bool const ced_reliable = (ced_confidence >= Settings2.ReliableCEDConfidenceMapping);
- bool const ced_not_reliable = (ced_confidence <= Settings2.UnReliableCEDConfidenceMapping);
- StringCchPrintfA(tmpBuf, 128, "' Conf=%.0f%% [%s])", ced_confidence * 100.0f,
- ced_reliable ? "reliable" : (ced_not_reliable ? "NOT reliable" : "???"));
- StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), tmpBuf);
- }
- else {
- StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), "'");
- }
+ //~StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), " || CED='");
+ //~if (encCED >= 0)
+ //~{
+ //~ //WideCharToMultiByte(CP_UTF7, 0, Encoding_GetLabel(encCED), -1, chEncodingLabel, ARRAYSIZE(chEncodingLabel), 0, 0);
+ //~ StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), encodingCED);
+ //~}
+ //~else {
+ //~ StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), (encCED == CPI_ASCII_7BIT) ? "ASCII" : "");
+ //~}
+ //~if ((encCED >= 0) || (encCED == CPI_ASCII_7BIT)) {
+ //~ bool const ced_reliable = (ced_confidence >= Settings2.ReliableCEDConfidenceMapping);
+ //~ bool const ced_not_reliable = (ced_confidence <= Settings2.UnReliableCEDConfidenceMapping);
+ //~ StringCchPrintfA(tmpBuf, 128, "' Conf=%.0f%% [%s])", ced_confidence * 100.0f,
+ //~ ced_reliable ? "reliable" : (ced_not_reliable ? "NOT reliable" : "???"));
+ //~ StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), tmpBuf);
+ //~}
+ //~else {
+ //~ StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), "'");
+ //~}
+
+ StringCchPrintfA(tmpBuf, 128, (int)lroundf(ucd_conf_perc) >= Settings2.AnalyzeReliableConfidenceLevel ? " (reliable)" : " (NOT reliable)");
+ StringCchCatA(chEncodingInfo, ARRAYSIZE(chEncodingInfo), tmpBuf);
MultiByteToWideChar(CP_UTF7, 0, chEncodingInfo, -1, wchEncodingInfo, ARRAYSIZE(wchEncodingInfo));
-
}
diff --git a/src/Notepad3.c b/src/Notepad3.c
index bc07ad093..a6cc832de 100644
--- a/src/Notepad3.c
+++ b/src/Notepad3.c
@@ -7006,11 +7006,12 @@ void LoadSettings()
Settings2.CurrentLineVerticalSlop = clampi(IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", Defaults2.CurrentLineVerticalSlop), 0, 25);
- int const iARCLdef = 51;
+ int const iARCLdef = 67;
Defaults2.AnalyzeReliableConfidenceLevel = (float)iARCLdef / 100.0f;
int const iARCLset = clampi(IniSectionGetInt(pIniSection, L"AnalyzeReliableConfidenceLevel", iARCLdef), 0, 100);
Settings2.AnalyzeReliableConfidenceLevel = (float)iARCLset / 100.0f;
+ /* ~~~
int const iRCEDCMdef = 85;
Defaults2.ReliableCEDConfidenceMapping = (float)iRCEDCMdef / 100.0f;
int const iRCEDCMset = clampi(IniSectionGetInt(pIniSection, L"ReliableCEDConfidenceMapping", iRCEDCMdef), 0, 100);
@@ -7020,7 +7021,7 @@ void LoadSettings()
Defaults2.UnReliableCEDConfidenceMapping = (float)iURCEDCMdef / 100.0f;
int const iURCEDCMset = clampi(IniSectionGetInt(pIniSection, L"UnReliableCEDConfidenceMapping", iURCEDCMdef), 0, iRCEDCMset);
Settings2.UnReliableCEDConfidenceMapping = (float)iURCEDCMset / 100.0f;
-
+ ~~~ */
Defaults2.AdministrationTool[0] = L'\0';
IniSectionGetString(pIniSection, L"AdministrationTool.exe", Defaults2.AdministrationTool,
diff --git a/src/Notepad3.vcxproj b/src/Notepad3.vcxproj
index 10cf2c01d..542d682e6 100644
--- a/src/Notepad3.vcxproj
+++ b/src/Notepad3.vcxproj
@@ -364,10 +364,6 @@
-
-
-
-
@@ -493,21 +489,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Notepad3.vcxproj.filters b/src/Notepad3.vcxproj.filters
index de09a7f71..b0f5a9d8b 100644
--- a/src/Notepad3.vcxproj.filters
+++ b/src/Notepad3.vcxproj.filters
@@ -25,21 +25,6 @@
{a6270a0b-5c38-4e68-b38c-5795ccb57302}
-
- {91d2fb70-4067-4692-b746-9a02db63f461}
-
-
- {8d78b8ca-ff0f-46cb-8da2-83c4bde259b9}
-
-
- {dbeb3dd1-1f65-45ec-a526-dc0e84e4c350}
-
-
- {1d7878c8-36e3-4bae-91d9-fda61101aa81}
-
-
- {fd5165c7-e622-408b-95f0-666d494aa8f1}
-
{1de8e161-7393-4043-be9d-7bd2d0cb02df}
@@ -93,18 +78,6 @@
Source Files
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
Source Files\tinyexpr
@@ -473,51 +446,6 @@
Header Files
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
Header Files
diff --git a/src/Notepad3DLL.vcxproj b/src/Notepad3DLL.vcxproj
index 6a64d9224..d24ee2fe7 100644
--- a/src/Notepad3DLL.vcxproj
+++ b/src/Notepad3DLL.vcxproj
@@ -364,10 +364,6 @@
-
-
-
-
@@ -493,21 +489,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Notepad3DLL.vcxproj.filters b/src/Notepad3DLL.vcxproj.filters
index de09a7f71..b0f5a9d8b 100644
--- a/src/Notepad3DLL.vcxproj.filters
+++ b/src/Notepad3DLL.vcxproj.filters
@@ -25,21 +25,6 @@
{a6270a0b-5c38-4e68-b38c-5795ccb57302}
-
- {91d2fb70-4067-4692-b746-9a02db63f461}
-
-
- {8d78b8ca-ff0f-46cb-8da2-83c4bde259b9}
-
-
- {dbeb3dd1-1f65-45ec-a526-dc0e84e4c350}
-
-
- {1d7878c8-36e3-4bae-91d9-fda61101aa81}
-
-
- {fd5165c7-e622-408b-95f0-666d494aa8f1}
-
{1de8e161-7393-4043-be9d-7bd2d0cb02df}
@@ -93,18 +78,6 @@
Source Files
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
Source Files\tinyexpr
@@ -473,51 +446,6 @@
Header Files
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util
-
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\languages
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\util\encodings
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
-
- Source Files\CED\compact_enc_det
-
Header Files
diff --git a/src/TypeDefs.h b/src/TypeDefs.h
index c7085e7d2..aeb669b11 100644
--- a/src/TypeDefs.h
+++ b/src/TypeDefs.h
@@ -471,8 +471,8 @@ typedef struct _settings2_t
int CurrentLineVerticalSlop;
float AnalyzeReliableConfidenceLevel;
- float ReliableCEDConfidenceMapping; // = 0.85f;
- float UnReliableCEDConfidenceMapping; //= 0.20f;
+ //~float ReliableCEDConfidenceMapping; // = 0.85f;
+ //~float UnReliableCEDConfidenceMapping; //= 0.20f;
WCHAR PreferredLanguageLocaleName[LOCALE_NAME_MAX_LENGTH+1];
WCHAR DefaultExtension[64];
diff --git a/src/VersionEx.h b/src/VersionEx.h
index 7f8f35853..834506941 100644
--- a/src/VersionEx.h
+++ b/src/VersionEx.h
@@ -8,7 +8,7 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 19
#define VERSION_REV 503
-#define VERSION_BUILD 1688
+#define VERSION_BUILD 1689
#define SCINTILLA_VER 415
#define ONIGMO_REGEX_VER 6.2.0
#define VERSION_PATCH RC