use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current locale uses UTF8;

fall back to widechar CRT functions in the locale is not UTF8


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-26 11:40:04 +00:00
parent 210bb741b9
commit 2523e9b700
23 changed files with 1368 additions and 656 deletions

View File

@@ -111,19 +111,20 @@ wxString wxMimeTypeCommands::GetVerbCmd(size_t n) const
// wxFileTypeInfo
// ----------------------------------------------------------------------------
wxFileTypeInfo::wxFileTypeInfo(const wxChar *mimeType,
const wxChar *openCmd,
const wxChar *printCmd,
const wxChar *desc,
...)
: m_mimeType(mimeType),
m_openCmd(openCmd),
m_printCmd(printCmd),
m_desc(desc)
void wxFileTypeInfo::VarArgInit(const wxString& mimeType,
const wxString& openCmd,
const wxString& printCmd,
const wxString& desc,
...)
{
va_list argptr;
va_start(argptr, desc);
m_mimeType = mimeType;
m_openCmd = openCmd;
m_printCmd = printCmd;
m_desc = desc;
for ( ;; )
{
// icc gives this warning in its own va_arg() macro, argh
@@ -132,7 +133,7 @@ wxFileTypeInfo::wxFileTypeInfo(const wxChar *mimeType,
#pragma warning(disable: 1684)
#endif
const wxChar *ext = va_arg(argptr, const wxChar *);
wxArgNormalizedString ext(WX_VA_ARG_STRING(argptr));
#ifdef __INTELC__
#pragma warning(pop)
@@ -143,7 +144,7 @@ wxFileTypeInfo::wxFileTypeInfo(const wxChar *mimeType,
break;
}
m_exts.Add(ext);
m_exts.Add(ext.GetString());
}
va_end(argptr);