summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2022-01-18 17:32:53 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2022-01-18 17:32:53 +0100
commit2e48fbe3f5e84ebb8a2de4f4fc0448d648d25c0c (patch)
treedd4023a73db49ad332d9f247d60de3b3296d056d /win
parent71966c7306d6ae24bc052d5433e6d97cc81a436a (diff)
downloadmariadb-git-2e48fbe3f5e84ebb8a2de4f4fc0448d648d25c0c.tar.gz
MDEV-27525 Invalid (non-UTF8) characters found for option 'plugin_dir'preview-10.8-MDEV-26713-Windows-i18-support
Two Problems 1. Upgrade wizard failed to retrieve path to service executable, if it contained non-ASCII. Fixed by setlocale(LC_ALL, "en_US.UTF8"), which was missing in upgrade wizard 2.mysql_upgrade_service only updated (converted to UTF8) the server's sections leaving client's as-is Corrected typo. 3. Fixed assertion in my_getopt, turns out to be too strict.
Diffstat (limited to 'win')
-rw-r--r--win/upgrade_wizard/upgradeDlg.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/win/upgrade_wizard/upgradeDlg.cpp b/win/upgrade_wizard/upgradeDlg.cpp
index 7aae4890b51..10a1787c231 100644
--- a/win/upgrade_wizard/upgradeDlg.cpp
+++ b/win/upgrade_wizard/upgradeDlg.cpp
@@ -15,6 +15,7 @@
#include <vector>
#include <winservice.h>
+#include <locale.h>
using namespace std;
@@ -271,6 +272,11 @@ BOOL CUpgradeDlg::OnInitDialog()
m_Progress.ShowWindow(SW_HIDE);
m_Ok.EnableWindow(FALSE);
+ if (GetACP() == CP_UTF8)
+ {
+ /* Required for mbstowcs, used in some functions.*/
+ setlocale(LC_ALL, "en_US.UTF8");
+ }
PopulateServicesList();
return TRUE; // return TRUE unless you set the focus to a control
}