From 2b8fd103b709f8026cc95e01b47f7f21513e3c42 Mon Sep 17 00:00:00 2001 From: Pavel Tyunin Date: Wed, 13 Feb 2019 15:00:23 +0200 Subject: [PATCH] Add wxConvAuto::IsFallbackEncoding() --- include/wx/convauto.h | 6 ++++++ interface/wx/convauto.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/include/wx/convauto.h b/include/wx/convauto.h index 3da6c6adc4..caab99973f 100644 --- a/include/wx/convauto.h +++ b/include/wx/convauto.h @@ -91,6 +91,12 @@ public: return m_bomType; } + // Return true if the fall-back encoding is used + bool IsFallbackEncoding() const + { + return m_ownsConv && m_bomType == wxBOM_None; + } + private: // common part of all ctors void Init() diff --git a/interface/wx/convauto.h b/interface/wx/convauto.h index 7ddfb26927..90e769c32a 100644 --- a/interface/wx/convauto.h +++ b/interface/wx/convauto.h @@ -146,6 +146,13 @@ public: */ wxBOM GetBOM() const; + /** + Check if the fall-back encoding is used. + + @since 3.1.5 + */ + bool IsFallbackEncoding() const; + /** Return a pointer to the characters that makes up this BOM.