X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57c5293e49b50007e8fb19f4953d65d6aeb45293..39c0acb66674c5e0424633cf162e6c10c92178d4:/include/wx/encconv.h?ds=inline diff --git a/include/wx/encconv.h b/include/wx/encconv.h index 2af9a9b597..d99eaea5e2 100644 --- a/include/wx/encconv.h +++ b/include/wx/encconv.h @@ -138,6 +138,17 @@ class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject // equivalent encodings, regardless the platform, including itself. static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc); + // Return true if [any text in] one multibyte encoding can be + // converted to another one losslessly. + // + // Do not call this with wxFONTENCODING_UNICODE, it doesn't make + // sense (always works in one sense and always depends on the text + // to convert in the other) + static bool CanConvert(wxFontEncoding encIn, wxFontEncoding encOut) + { + return GetAllEquivalents(encIn).Index(encOut) != wxNOT_FOUND; + } + private: #if wxUSE_WCHAR_T