gnucash stable: Bug 799504 - Description of CAMT 053.001.02 has duplicate text
John Ralls
jralls at code.gnucash.org
Sun Dec 14 16:41:54 EST 2025
Updated via https://github.com/Gnucash/gnucash/commit/cb8777a6 (commit)
from https://github.com/Gnucash/gnucash/commit/af29a5ff (commit)
commit cb8777a69a189f2f6215eb177ccc7cf2715295ad
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 14 13:38:20 2025 -0800
Bug 799504 - Description of CAMT 053.001.02 has duplicate text
diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index e1b1d3a3d9..935468304d 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -325,16 +325,19 @@ join_ab_strings_cb (const gchar *str, gpointer user_data)
if (!str || !*str)
return NULL;
- tmp = g_strdup (str);
+ tmp = g_utf8_normalize (str, -1, G_NORMALIZE_NFC);
g_strstrip (tmp);
gnc_utf8_strip_invalid_and_controls (tmp);
if (*acc)
{
- gchar *join = g_strjoin (" ", *acc, tmp, (gchar*) NULL);
- g_free (*acc);
+ if (!strstr (*acc, tmp))
+ {
+ gchar *join = g_strjoin (" ", *acc, tmp, (gchar*) NULL);
+ g_free (*acc);
+ *acc = join;
+ }
g_free (tmp);
- *acc = join;
}
else
{
@@ -379,7 +382,7 @@ gnc_ab_get_purpose (const AB_TRANSACTION *ab_trans, gboolean is_ofx)
* hence we put this text in front of the purpose. */
ab_transactionText = AB_Transaction_GetTransactionText (ab_trans);
if (ab_transactionText && *ab_transactionText)
- gnc_description = g_strdup (ab_transactionText);
+ gnc_description = g_utf8_normalize (ab_transactionText, -1, G_NORMALIZE_NFC);
}
ab_purpose = AB_Transaction_GetPurposeAsStringList (ab_trans);
Summary of changes:
gnucash/import-export/aqb/gnc-ab-utils.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list