gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sun Nov 29 13:59:32 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/7a8a0f40 (commit)
via https://github.com/Gnucash/gnucash/commit/4006e5a4 (commit)
from https://github.com/Gnucash/gnucash/commit/b0a56730 (commit)
commit 7a8a0f40b1de7d8822c93f27fd99bd3f88b7d121
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Nov 29 10:59:25 2020 -0800
Fix missing space in warning message.
diff --git a/libgnucash/core-utils/gnc-locale-utils.cpp b/libgnucash/core-utils/gnc-locale-utils.cpp
index c55ac61f3..10574c210 100644
--- a/libgnucash/core-utils/gnc-locale-utils.cpp
+++ b/libgnucash/core-utils/gnc-locale-utils.cpp
@@ -61,7 +61,7 @@ gnc_get_locale()
char* locale = g_strdup(setlocale(LC_ALL, ""));
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
- "Failed to create C++ default locale from"
+ "Failed to create C++ default locale from "
"%s because %s. Using the 'C' locale for C++.",
locale, err.what());
g_free(locale);
commit 4006e5a488c350305c2bb95f3e970669cc99e0f5
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Nov 29 10:59:06 2020 -0800
Bug 794807 - Calendar widget current month shown as (null).
Locales need to end in UTF-8 to work right.
diff --git a/gnucash/gnucash-core-app.cpp b/gnucash/gnucash-core-app.cpp
index 451b1f712..4559ddf46 100644
--- a/gnucash/gnucash-core-app.cpp
+++ b/gnucash/gnucash-core-app.cpp
@@ -135,7 +135,7 @@ mac_find_close_country(NSString *locale_str, NSString *country_str,
NSString *this_locale, *new_locale = nil;
PWARN("Apple Locale is set to a value %s not supported"
" by the C runtime", [locale_str UTF8String]);
- while ((this_locale = (NSString*)[locale_iter nextObject]))
+ while ((this_locale = [(NSString*)[locale_iter nextObject] stringByAppendingString: @".UTF-8"]))
if ([ [ [NSLocale componentsFromLocaleIdentifier: this_locale]
objectForKey: NSLocaleCountryCode]
isEqualToString: country_str] &&
@@ -158,7 +158,7 @@ mac_find_close_country(NSString *locale_str, NSString *country_str,
locale_str = new_locale;
else
{
- locale_str = @"en_US";
+ locale_str = @"en_US.UTF-8";
setlocale(LC_ALL, [locale_str UTF8String]);
}
PWARN("Using %s instead.", [locale_str UTF8String]);
@@ -233,8 +233,9 @@ set_mac_locale()
{
lang_str = [locale objectForKey: NSLocaleLanguageCode];
country_str = [locale objectForKey: NSLocaleCountryCode];
- locale_str = [ [lang_str stringByAppendingString: @"_"]
- stringByAppendingString: country_str];
+ locale_str = [[[lang_str stringByAppendingString: @"_"]
+ stringByAppendingString: country_str]
+ stringByAppendingString: @".UTF-8"];
}
@catch (NSException *err)
{
@@ -246,7 +247,7 @@ set_mac_locale()
}
/* If we didn't get a valid current locale, the string will be just "_" */
if ([locale_str isEqualToString: @"_"])
- locale_str = @"en_US";
+ locale_str = @"en_US.UTF-8";
lang_str = mac_convert_complex_language(lang_str);
if (!setlocale(LC_ALL, [locale_str UTF8String]))
Summary of changes:
gnucash/gnucash-core-app.cpp | 11 ++++++-----
libgnucash/core-utils/gnc-locale-utils.cpp | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
More information about the gnucash-changes
mailing list