diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index b9f12cfa4..ecc00f6a0 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -33,6 +33,7 @@ import codecs import locale import collections import logging +from binascii import hexlify LOG = logging.getLogger("." + __name__) LOG.propagate = True @@ -920,8 +921,9 @@ class GrampsLocale: """ if HAVE_ICU and self.collator: - #ICU can digest strings and unicode - return self.collator.getCollationKey(string).getByteArray() + # ICU can digest strings and unicode + # Use hexlify() as to make a consistent string, fixing bug #10077 + return hexlify(self.collator.getCollationKey(string).getByteArray()).decode() else: if isinstance(string, bytes): string = string.decode("utf-8", "replace")