From 5576edf8d8abf87473eb6646346b8acd380d09a7 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 30 Mar 2005 16:29:40 +0000 Subject: [PATCH] Forgot to commit. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/strconv.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/wx/strconv.h b/include/wx/strconv.h index ce0f040121..2d82151481 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -86,6 +86,31 @@ public: virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; }; +#ifdef __UNIX__ + +// ---------------------------------------------------------------------------- +// wxConvBrokenFileNames is made for Unix in Unicode mode when +// files are accidentally written in an encoding which is not +// the system encoding. Typically, the system encoding will be +// UTF8 but there might be files stored in ISO8859-1 on disk. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConvBrokenFileNames : public wxMBConv +{ +public: + wxConvBrokenFileNames(); + virtual ~wxConvBrokenFileNames() { delete m_conv; } + + 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; + +private: + // the conversion object we forward to + wxMBConv *m_conv; +}; + +#endif + // ---------------------------------------------------------------------------- // wxMBConvUTF7 (for conversion using UTF7 encoding) // ---------------------------------------------------------------------------- -- 2.45.2