Skip to content

Commit 72a1506

Browse files
committed
Show a warning when system encoding is not set (closes #137)
1 parent 57b11bb commit 72a1506

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

airdcppd/Client.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ bool Client::startup() {
8585
[&](float aProgress) {}
8686
);
8787

88+
if (Text::systemCharset.empty() || Text::systemCharset == "ANSI_X3.4-1968") {
89+
LogManager::getInstance()->message("System encoding is not set. This will cause issues with non-ASCII characters.", LogMessage::SEV_ERROR);
90+
}
91+
8892
auto webResources = Util::getStartupParam("--web-resources");
8993
printf("Starting web server");
9094
auto serverStarted = webserver::WebServerManager::getInstance()->start([](const string& aError) {
@@ -118,7 +122,7 @@ bool Client::startup() {
118122
if (!Util::hasStartupParam("--no-autoconnect")) {
119123
FavoriteManager::getInstance()->autoConnect();
120124
}
121-
125+
122126
auto cdmHub = Util::hasStartupParam("--cdm-hub");
123127
auto cdmClient = Util::hasStartupParam("--cdm-client");
124128
if (cdmHub || cdmClient) {
@@ -133,7 +137,7 @@ void Client::shutdown() {
133137
if (!started) {
134138
return;
135139
}
136-
140+
137141
cdmDebug.reset(nullptr);
138142

139143
ClientManager::getInstance()->putClients();

0 commit comments

Comments
 (0)