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

@@ -116,16 +116,44 @@ private:
class WXDLLIMPEXP_BASE wxFileTypeInfo
{
private:
void VarArgInit(const wxString& mimeType,
const wxString& openCmd,
const wxString& printCmd,
const wxString& desc,
// the other parameters form a NULL terminated list of
// extensions
...);
public:
// ctors
// a normal item
wxFileTypeInfo(const wxChar *mimeType,
const wxChar *openCmd,
const wxChar *printCmd,
const wxChar *desc,
// the other parameters form a NULL terminated list of
// extensions
...);
// wxFileTypeInfo(const wxString& mimeType,
// const wxString& openCmd,
// const wxString& printCmd,
// const wxString& desc,
// // the other parameters form a NULL terminated list of
// // extensions
// ...);
WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo,
4, (const wxString&, const wxString&,
const wxString&, const wxString&),
VarArgInit)
#ifdef __WATCOMC__
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo,
4, (const char*, const char*,
const char*, const char*),
VarArgInit)
WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo,
4, (const wchar_t*, const wchar_t*,
const wchar_t*, const wchar_t*),
VarArgInit)
WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo,
4, (const wxCStrData&, const wxCStrData&,
const wxCStrData&, const wxCStrData&),
VarArgInit)
#endif
// the array elements correspond to the parameters of the ctor above in
// the same order