BACKENDS: NETWORKING: Remove unused toUtf8 helper
- All conversions are handled by Common:: helpers.
This commit is contained in:
parent
8c5611c3ca
commit
c87d0d6834
2 changed files with 0 additions and 17 deletions
|
@ -172,21 +172,6 @@ bool HandlerUtils::permittedPath(const Common::String path) {
|
|||
return hasPermittedPrefix(path) && !isBlacklisted(path);
|
||||
}
|
||||
|
||||
Common::String HandlerUtils::toUtf8(const char *text) {
|
||||
#ifdef USE_TRANSLATION
|
||||
Common::String guiEncoding = TransMan.getCurrentCharset();
|
||||
if (guiEncoding != "ASCII") {
|
||||
char *utf8Text = Common::Encoding::convert("utf-8", guiEncoding, text, strlen(text));
|
||||
if (utf8Text != nullptr) {
|
||||
Common::String str(utf8Text);
|
||||
free(utf8Text);
|
||||
return str;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Common::String(text);
|
||||
}
|
||||
|
||||
void HandlerUtils::setMessageHandler(Client &client, Common::String message, Common::String redirectTo) {
|
||||
Common::String response = "<html><head><title>ScummVM</title><meta charset=\"utf-8\"/></head><body>{message}</body></html>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue