diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-09 23:33:55 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-09 23:33:55 +0900 |
| commit | a10cda2f17916895d8c6bc3cd69a360947017771 (patch) | |
| tree | 0740833f77a3e239ea58e870a9dcb9086d43e516 /src/Platform.cc | |
| parent | 02307cee0a395d8405d0e160664d4a37c79fe16c (diff) | |
Use global::cout to output string to stdout.
In MinGW32 build, global::cout is WinConsoleFile. When outputing to
console, it uses WriteConsoleW, so Unicode characters are written.
Fixed memory leak in WChar<->MultiByte conversion functions. The
portion of code which uses std::cout is rewritten to use global::cout.
Diffstat (limited to 'src/Platform.cc')
| -rw-r--r-- | src/Platform.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Platform.cc b/src/Platform.cc index b0e315a3..dfcaebd9 100644 --- a/src/Platform.cc +++ b/src/Platform.cc @@ -72,6 +72,7 @@ #include "DlAbortEx.h" #include "message.h" #include "fmt.h" +#include "console.h" namespace aria2 { @@ -94,6 +95,8 @@ bool Platform::setUp() } initialized_ = true; + global::initConsole(); + #ifdef ENABLE_NLS setlocale (LC_CTYPE, ""); setlocale (LC_MESSAGES, ""); |
