gnucash stable: [reports] use ICU for Unicode string comparison
Christopher Lam
clam at code.gnucash.org
Tue Jun 17 20:28:23 EDT 2025
Updated via https://github.com/Gnucash/gnucash/commit/b0c60fb3 (commit)
from https://github.com/Gnucash/gnucash/commit/48b1f514 (commit)
commit b0c60fb310512c04a8b2336c06db5686723f16bf
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Jun 14 10:03:32 2025 +0800
[reports] use ICU for Unicode string comparison
diff --git a/bindings/core-utils.i b/bindings/core-utils.i
index b0c501d446..064d60707a 100644
--- a/bindings/core-utils.i
+++ b/bindings/core-utils.i
@@ -29,6 +29,7 @@
#include <gnc-locale-utils.h>
#include <glib.h>
#include <glib/gi18n.h>
+#include <gnc-unicode.h>
#include <gnc-version.h>
#include <libintl.h>
@@ -49,6 +50,7 @@ PyObject* SWIG_init (void);
%include <gnc-environment.h>
%include <gnc-prefs.h>
+%include <gnc-unicode.h>
%include <gnc-version.h>
%newobject gnc_path_get_bindir;
diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm
index bab5106e65..9f3bfcde7e 100644
--- a/bindings/guile/core-utils.scm
+++ b/bindings/guile/core-utils.scm
@@ -75,8 +75,8 @@
(issue-deprecation-warning "Using _ to call gettext is disallowed in guile-3 and will be removed in the future. Use G_ instead.")
(gnc:gettext x))))
-(define (gnc:string-locale<? a b) (< (g-utf8-collate a b) 0))
-(define (gnc:string-locale>? a b) (> (g-utf8-collate a b) 0))
+(define (gnc:string-locale<? a b) (< (gnc-unicode-compare-accented-case-sensitive a b) 0))
+(define (gnc:string-locale>? a b) (> (gnc-unicode-compare-accented-case-sensitive a b) 0))
;; Custom unbound-variable exception printer: instead of generic "In
;; procedure module-lookup: Unbound variable: varname", it will first
Summary of changes:
bindings/core-utils.i | 2 ++
bindings/guile/core-utils.scm | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list