added CanConvert()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-10-13 23:47:22 +00:00
parent 19da49fcd0
commit 5bc97d1b81
2 changed files with 28 additions and 0 deletions

View File

@@ -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