#ifdef __WXMSW__
#include "wx/msw/private.h"
+#endif
+
+#ifdef __WINDOWS__
#include "wx/msw/missing.h"
#endif
#include "wx/encconv.h"
#include "wx/fontmap.h"
+#include "wx/utils.h"
#ifdef __WXMAC__
#include <ATSUnicode.h>
{
ms_wcCharsetName = NULL;
- // VS: we must not output an error here, since wxWindows will safely
+ // VS: we must not output an error here, since wxWidgets will safely
// fall back to using wxEncodingConverter.
wxLogTrace(wxT("strconv"), wxT("Impossible to convert to/from charset '%s' with iconv, falling back to wxEncodingConverter."), name);
//wxLogError(
#ifdef wxHAVE_WIN32_MB2WC
// from utils.cpp
+#if wxUSE_FONTMAP
extern WXDLLIMPEXP_BASE long wxCharsetToCodepage(const wxChar *charset);
extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding);
+#endif
class wxMBConv_win32 : public wxMBConv
{
m_CodePage = CP_ACP;
}
+#if wxUSE_FONTMAP
wxMBConv_win32(const wxChar* name)
{
m_CodePage = wxCharsetToCodepage(name);
{
m_CodePage = wxEncodingToCodepage(encoding);
}
+#endif
size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const
{
#ifdef wxHAVE_WIN32_MB2WC
{
+#if wxUSE_FONTMAP
wxMBConv_win32 *conv = m_name ? new wxMBConv_win32(m_name)
: new wxMBConv_win32(m_encoding);
if ( conv->IsOk() )
return conv;
delete conv;
+#else
+ return NULL;
+#endif
}
#endif // wxHAVE_WIN32_MB2WC
#if defined(__WXMAC__)