#if wxUSE_WCHAR_T
-#ifdef __WXMSW__
- #include "wx/msw/private.h"
-#endif
-
#ifdef __WINDOWS__
+ #include "wx/msw/private.h"
#include "wx/msw/missing.h"
#endif
#include "wx/utils.h"
#ifdef __WXMAC__
+#ifndef __DARWIN__
#include <ATSUnicode.h>
#include <TextCommon.h>
#include <TextEncodingConverter.h>
+#endif
#include "wx/mac/private.h" // includes mac headers
#endif
#ifdef __UNIX__
// ----------------------------------------------------------------------------
-// wxConvBrokenFileNames
+// wxConvBrokenFileNames
// ----------------------------------------------------------------------------
wxConvBrokenFileNames::wxConvBrokenFileNames(const wxChar *charset)
static bool ms_wcNeedsSwap;
};
+// make the constructor available for unit testing
+WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_iconv( const wxChar* name )
+{
+ wxMBConv_iconv* result = new wxMBConv_iconv( name );
+ if ( !result->IsOk() )
+ {
+ delete result;
+ return 0;
+ }
+ return result;
+}
+
const char *wxMBConv_iconv::ms_wcCharsetName = NULL;
bool wxMBConv_iconv::ms_wcNeedsSwap = false;
DECLARE_NO_COPY_CLASS(wxMBConv_wxwin)
};
+// make the constructors available for unit testing
+WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_wxwin( const wxChar* name )
+{
+ wxMBConv_wxwin* result = new wxMBConv_wxwin( name );
+ if ( !result->IsOk() )
+ {
+ delete result;
+ return 0;
+ }
+ return result;
+}
+
#endif // wxUSE_FONTMAP
// ============================================================================
#if wxUSE_FONTMAP
if ( name.empty() )
- name = wxFontMapperBase::Get()->GetEncodingName(m_encoding);
+ name = wxFontMapperBase::GetEncodingName(m_encoding);
#endif // wxUSE_FONTMAP
wxMBConv_iconv *conv = new wxMBConv_iconv(name);