summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2019-07-16 07:22:07 +0200
committerMilan Crha <mcrha@redhat.com>2019-07-16 07:22:07 +0200
commitfe4ac94ce3c14f200e049a5d102fc0e4b811c71e (patch)
treed35307e328473c244090df07665831f2b68ef742
parent2bfd1763c63701ebc858d6c770c99338a77345af (diff)
downloadevolution-data-server-fe4ac94ce3c14f200e049a5d102fc0e4b811c71e.tar.gz
I#137 - POSIX locale tests fail with ICU 64.x
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137
-rw-r--r--src/libedataserver/e-collator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c
index 718eac5da..ec2cf7951 100644
--- a/src/libedataserver/e-collator.c
+++ b/src/libedataserver/e-collator.c
@@ -132,6 +132,11 @@ canonicalize_locale (const gchar *posix_locale,
gint len;
const gchar *collation_type = NULL;
+ if (posix_locale && (
+ g_ascii_strcasecmp (posix_locale, "C") == 0 ||
+ g_ascii_strcasecmp (posix_locale, "POSIX") == 0))
+ posix_locale = "en_US_POSIX";
+
len = uloc_canonicalize (posix_locale, locale_buffer, LOCALE_BUFFER_LEN, &status);
if (U_FAILURE (status)) {