From 6c247256d29f030093748adf3fb665f1ccc74e5d Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sun, 1 Nov 2020 04:55:29 +0800 Subject: [PATCH] Update string_manager_client.cpp --- ryzom/client/src/string_manager_client.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ryzom/client/src/string_manager_client.cpp b/ryzom/client/src/string_manager_client.cpp index 734b3bea6..98483bd6b 100644 --- a/ryzom/client/src/string_manager_client.cpp +++ b/ryzom/client/src/string_manager_client.cpp @@ -1629,13 +1629,13 @@ const char *CStringManagerClient::getTitleLocalizedName(const string &titleId, b } -const ucchar *CStringManagerClient::getLocalizedName(const ucstring &uctext) +const ucchar *CStringManagerClient::getLocalizedName(const string &uctext) { - string text = uctext.toUtf8(); + string text = uctext; if (text[0] == '[') { vector textLocalizations; - static ucstring defaultText; + static string defaultText; splitString(text.substr(1), "[", textLocalizations); if (!textLocalizations.empty()) { @@ -1643,12 +1643,12 @@ const ucchar *CStringManagerClient::getLocalizedName(const ucstring &uctext) { if (textLocalizations[i].substr(0, 3) == CI18N::getCurrentLanguageCode()+"]") { - defaultText.fromUtf8(textLocalizations[i].substr(3)); + defaultText = textLocalizations[i].substr(3); return defaultText.c_str(); } else if (textLocalizations[i].substr(0, 3) == "wk]") { - defaultText.fromUtf8(textLocalizations[i].substr(3)); + defaultText = extLocalizations[i].substr(3); } } }