Initialize the global charset converter with a dummy so that text output with mxmsg() works before the locale is initialized.

This commit is contained in:
Moritz Bunkus 2009-08-17 21:01:22 +02:00
parent 7afb6bf704
commit c913b2f52c
3 changed files with 6 additions and 2 deletions

View File

@ -44,6 +44,9 @@ charset_converter_cptr g_cc_local_utf8;
std::map<std::string, charset_converter_cptr> charset_converter_c::s_converters; std::map<std::string, charset_converter_cptr> charset_converter_c::s_converters;
charset_converter_c::charset_converter_c() {
}
charset_converter_c::charset_converter_c(const std::string &charset) charset_converter_c::charset_converter_c(const std::string &charset)
: m_charset(charset) : m_charset(charset)
{ {

View File

@ -34,6 +34,7 @@ protected:
std::string m_charset; std::string m_charset;
public: public:
charset_converter_c();
charset_converter_c(const std::string &charset); charset_converter_c(const std::string &charset);
virtual ~charset_converter_c(); virtual ~charset_converter_c();

View File

@ -36,8 +36,8 @@ bool g_warning_issued = false;
std::string g_stdio_charset; std::string g_stdio_charset;
static bool s_mm_stdio_redirected = false; static bool s_mm_stdio_redirected = false;
charset_converter_cptr g_cc_stdio; charset_converter_cptr g_cc_stdio = charset_converter_cptr(new charset_converter_c);
counted_ptr<mm_io_c> g_mm_stdio = counted_ptr<mm_io_c>(new mm_stdio_c()); counted_ptr<mm_io_c> g_mm_stdio = counted_ptr<mm_io_c>(new mm_stdio_c);
void void
redirect_stdio(mm_io_c *stdio) { redirect_stdio(mm_io_c *stdio) {