-public:
- wxConvBrokenFileNames() : m_utf8conv(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL) { }
- virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const;
- virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const;
- inline bool UseUTF8() const;
-private:
- wxMBConvUTF8 m_utf8conv;
-};
-
-bool wxConvBrokenFileNames::UseUTF8() const
-{
-#if defined HAVE_LANGINFO_H && defined CODESET
- char *codeset = nl_langinfo(CODESET);
- return strcmp(codeset, "UTF-8") == 0;
-#else
- return false;
-#endif
+ if ( !charset || wxStricmp(charset, _T("UTF-8")) == 0
+ || wxStricmp(charset, _T("UTF8")) == 0 )
+ m_conv = new wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL);
+ else
+ m_conv = new wxCSConv(charset);