git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46265 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
         return m_conv->GetMBNulLen();
     }
 
         return m_conv->GetMBNulLen();
     }
 
+#if wxUSE_UNICODE_UTF8
+    virtual bool IsUTF8() const { return m_conv->IsUTF8(); }
+#endif
+
     virtual wxMBConv *Clone() const { return new wxConvBrokenFileNames(*this); }
 
 private:
     virtual wxMBConv *Clone() const { return new wxConvBrokenFileNames(*this); }
 
 private:
     virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
     virtual size_t GetMBNulLen() const;
 
     virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
     virtual size_t GetMBNulLen() const;
 
+#if wxUSE_UNICODE_UTF8
+    virtual bool IsUTF8() const;
+#endif
+
     virtual wxMBConv *Clone() const { return new wxCSConv(*this); }
 
     void Clear();
     virtual wxMBConv *Clone() const { return new wxCSConv(*this); }
 
     void Clear();
 
     // classify this encoding as explained in wxMBConv::GetMBNulLen() comment
     virtual size_t GetMBNulLen() const;
 
     // classify this encoding as explained in wxMBConv::GetMBNulLen() comment
     virtual size_t GetMBNulLen() const;
 
+#if wxUSE_UNICODE_UTF8
+    virtual bool IsUTF8() const;
+#endif
+
     virtual wxMBConv *Clone() const
     {
         wxMBConv_iconv *p = new wxMBConv_iconv(m_name);
     virtual wxMBConv *Clone() const
     {
         wxMBConv_iconv *p = new wxMBConv_iconv(m_name);
     return m_minMBCharWidth;
 }
 
     return m_minMBCharWidth;
 }
 
+#if wxUSE_UNICODE_UTF8
+bool wxMBConv_iconv::IsUTF8() const
+{
+    return wxStricmp(m_name, "UTF-8") == 0 ||
+           wxStricmp(m_name, "UTF8") == 0;
+}
+#endif
+
         return m_convReal->GetMBNulLen();
     }
 
         return m_convReal->GetMBNulLen();
     }
 
+    // otherwise, we are ISO-8859-1
+#if wxUSE_UNICODE_UTF8
+bool wxCSConv::IsUTF8() const
+{
+    CreateConvIfNeeded();
+
+    if ( m_convReal )
+    {
+        return m_convReal->IsUTF8();
+    }
+
+    // otherwise, we are ISO-8859-1
+    return false;
+}
+#endif
+