Browse Source

Bot: Console CodePage is now set to UTF-8 on Windows

RenX.ServerList: Fixed a JSON error in servers_long.jsp
pull/3/head
Jessica James 8 years ago
parent
commit
b1d106ebd5
  1. 10
      Bot/Main.cpp
  2. 2
      RenX.ServerList/RenX_ServerList.cpp

10
Bot/Main.cpp

@ -32,6 +32,10 @@
#include "Console_Command.h" #include "Console_Command.h"
#include "IRC_Command.h" #include "IRC_Command.h"
#if defined _WIN32
#include <Windows.h>
#endif // _WIN32
using namespace Jupiter::literals; using namespace Jupiter::literals;
Jupiter::INIFile o_config; Jupiter::INIFile o_config;
@ -94,6 +98,12 @@ int main(int argc, const char **args)
Jupiter::ReferenceString command, plugins_directory, configs_directory; Jupiter::ReferenceString command, plugins_directory, configs_directory;
size_t index; size_t index;
#if defined _WIN32
// Sets console to UTF-8
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
#endif // _WIN32
srand(static_cast<unsigned int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count())); srand(static_cast<unsigned int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()));
puts(Jupiter::copyright); puts(Jupiter::copyright);
const char *configFileName = "Config.ini"; const char *configFileName = "Config.ini";

2
RenX.ServerList/RenX_ServerList.cpp

@ -331,7 +331,7 @@ Jupiter::StringS server_as_long_json(const RenX::Server *server)
"Player Limit": %d, "Player Limit": %d,
"Vehicle Limit": %d, "Vehicle Limit": %d,
"bAutoBalanceTeams": %s, "bAutoBalanceTeams": %s,
"Team Mode": %d "Team Mode": %d,
"bSpawnCrates": %s, "bSpawnCrates": %s,
"CrateRespawnAfterPickup": %f, "CrateRespawnAfterPickup": %f,
"Time Limit": %d "Time Limit": %d

Loading…
Cancel
Save