Allow specifying character set for wxLogStderr and wxLogStream.

Until now, a mixture of non-UTF-8 and UTF-8 could be written in some circumstances.
This commit is contained in:
Lauri Nurmi
2016-02-20 15:07:11 +02:00
parent 1417776d33
commit 6b73bd9136
5 changed files with 104 additions and 11 deletions

View File

@@ -64,7 +64,9 @@ private:
class WXDLLIMPEXP_BASE wxMessageOutputStderr : public wxMessageOutput
{
public:
wxMessageOutputStderr(FILE *fp = stderr) : m_fp(fp) { }
wxMessageOutputStderr(FILE *fp = stderr,
const wxMBConv &conv = wxConvWhateverWorks);
virtual ~wxMessageOutputStderr();
virtual void Output(const wxString& str) wxOVERRIDE;
@@ -74,6 +76,7 @@ protected:
wxString AppendLineFeedIfNeeded(const wxString& str);
FILE *m_fp;
const wxMBConv *m_conv;
};
// ----------------------------------------------------------------------------