added CanConvert()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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).Find(encOut) != wxNOT_FOUND;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
Reference in New Issue
Block a user