Skip to content

Commit

Permalink
Win32: remove Russian locale and codepage.
Browse files Browse the repository at this point in the history
* Now uses environment's default locale
* Codepage is now UTF-8
  • Loading branch information
anonimal committed Feb 22, 2016
1 parent ce616d2 commit d207188
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app/DaemonWin32.cpp
Expand Up @@ -43,10 +43,11 @@ namespace i2p {
namespace util {

bool DaemonWin32::Init() {
setlocale(LC_CTYPE, "");
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
setlocale(LC_ALL, "Russian"); // TODO(unassigned) set different locale
// TODO(unassigned): use Boost.Locale
setlocale(LC_CTYPE, ""); // "" uses environment's default locale
SetConsoleCP(65001); // UTF-8
SetConsoleOutputCP(65001);
setlocale(LC_ALL, "");
if (!Daemon_Singleton::Init())
return false;
if (I2PService::isService())
Expand Down Expand Up @@ -87,9 +88,9 @@ bool DaemonWin32::Init() {

bool DaemonWin32::Start() {
setlocale(LC_CTYPE, "");
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
setlocale(LC_ALL, "Russian"); // TODO(unassigned) set different locale
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
setlocale(LC_ALL, "");
return Daemon_Singleton::Start();
}

Expand Down

0 comments on commit d207188

Please sign in to comment.