added trace message to wxCSConv creation code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,6 +83,9 @@
|
|||||||
|
|
||||||
#include "wx/mac/private.h" // includes mac headers
|
#include "wx/mac/private.h" // includes mac headers
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TRACE_STRCONV _T("strconv")
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros
|
// macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1425,11 +1428,11 @@ wxMBConv_iconv::wxMBConv_iconv(const wxChar *name)
|
|||||||
|
|
||||||
// VS: we must not output an error here, since wxWidgets will safely
|
// VS: we must not output an error here, since wxWidgets will safely
|
||||||
// fall back to using wxEncodingConverter.
|
// fall back to using wxEncodingConverter.
|
||||||
wxLogTrace(wxT("strconv"), wxT("Impossible to convert to/from charset '%s' with iconv, falling back to wxEncodingConverter."), name);
|
wxLogTrace(TRACE_STRCONV, wxT("Impossible to convert to/from charset '%s' with iconv, falling back to wxEncodingConverter."), name);
|
||||||
//wxLogError(
|
//wxLogError(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxLogTrace(wxT("strconv"), wxT("wchar_t charset is '%s', needs swap: %i"), ms_wcCharsetName, ms_wcNeedsSwap);
|
wxLogTrace(TRACE_STRCONV, wxT("wchar_t charset is '%s', needs swap: %i"), ms_wcCharsetName, ms_wcNeedsSwap);
|
||||||
}
|
}
|
||||||
else // we already have ms_wcCharsetName
|
else // we already have ms_wcCharsetName
|
||||||
{
|
{
|
||||||
@@ -1515,7 +1518,7 @@ size_t wxMBConv_iconv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
|||||||
if (ICONV_FAILED(cres, inbuf))
|
if (ICONV_FAILED(cres, inbuf))
|
||||||
{
|
{
|
||||||
//VS: it is ok if iconv fails, hence trace only
|
//VS: it is ok if iconv fails, hence trace only
|
||||||
wxLogTrace(wxT("strconv"), wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode()));
|
wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode()));
|
||||||
return (size_t)-1;
|
return (size_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1583,7 +1586,7 @@ size_t wxMBConv_iconv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
|
|||||||
if (ICONV_FAILED(cres, inbuf))
|
if (ICONV_FAILED(cres, inbuf))
|
||||||
{
|
{
|
||||||
//VS: it is ok if iconv fails, hence trace only
|
//VS: it is ok if iconv fails, hence trace only
|
||||||
wxLogTrace(wxT("strconv"), wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode()));
|
wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode()));
|
||||||
return (size_t)-1;
|
return (size_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2520,6 +2523,13 @@ static wxEncodingNameCache gs_nameCache;
|
|||||||
|
|
||||||
wxMBConv *wxCSConv::DoCreate() const
|
wxMBConv *wxCSConv::DoCreate() const
|
||||||
{
|
{
|
||||||
|
#if wxUSE_FONTMAP
|
||||||
|
wxLogTrace(TRACE_STRCONV,
|
||||||
|
wxT("creating conversion for %s"),
|
||||||
|
(m_name ? m_name
|
||||||
|
: wxFontMapperBase::GetEncodingName(m_encoding).c_str()));
|
||||||
|
#endif // wxUSE_FONTMAP
|
||||||
|
|
||||||
// check for the special case of ASCII or ISO8859-1 charset: as we have
|
// check for the special case of ASCII or ISO8859-1 charset: as we have
|
||||||
// special knowledge of it anyhow, we don't need to create a special
|
// special knowledge of it anyhow, we don't need to create a special
|
||||||
// conversion object
|
// conversion object
|
||||||
|
Reference in New Issue
Block a user