Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/c28c44db12f99d9311bd9247a300356331b0860d
>---------------------------------------------------------------
commit c28c44db12f99d9311bd9247a300356331b0860d
Author: w17 <
vladimir....@gmail.com>
Date: Thu May 28 13:42:56 2026 +0300
gh#1103
>---------------------------------------------------------------
c28c44db12f99d9311bd9247a300356331b0860d
far/changelog | 5 +++++
far/filestr.cpp | 2 +-
far/vbuild.m4 | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/far/changelog b/far/changelog
index 68d6ce26a..6f4bd950a 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+w17 2026-05-28 13:40:37+03:00 - build 6688
+
+1. gh-1103: Codepage autodetect
+
--------------------------------------------------------------------------------
drkns 2026-05-15 01:17:17+01:00 - build 6687
diff --git a/far/filestr.cpp b/far/filestr.cpp
index e9bb5ad0f..e5d986794 100644
--- a/far/filestr.cpp
+++ b/far/filestr.cpp
@@ -438,7 +438,7 @@ static bool GetCpUsingML(std::string_view Str, uintptr_t& Codepage, function_ref
const auto is_cp_acceptable = [no_cjk, IsCodepageAcceptable](const UINT cp) {
return (cp != 0xffffffff) && !(no_cjk && cp >= 932 && cp <= 950) && IsCodepageAcceptable(cp);
};
- const auto It = std::ranges::find_if(Scores, [&](DetectEncodingInfo const& i) { return is_cp_acceptable(i.nLangID); });
+ const auto It = std::ranges::find_if(Scores, [&](DetectEncodingInfo const& i) { return is_cp_acceptable(i.nCodePage); });
if (It == Scores.end())
return false;
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 734fd6707..f7bd8cc28 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6687
+6688