summaryrefslogtreecommitdiffstats
path: root/libnumtext_remove_separators.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-09-08 23:24:34 +0200
committerMattias Andrée <maandree@kth.se>2021-09-08 23:24:39 +0200
commit84b8038689a1b289aeaf0efb2c0545dec79c1888 (patch)
treec81de8773a3b09e137b82ca1686dc23e31118fda /libnumtext_remove_separators.c
parentFix typo (diff)
downloadlibnumtext-84b8038689a1b289aeaf0efb2c0545dec79c1888.tar.gz
libnumtext-84b8038689a1b289aeaf0efb2c0545dec79c1888.tar.bz2
libnumtext-84b8038689a1b289aeaf0efb2c0545dec79c1888.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libnumtext_remove_separators.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libnumtext_remove_separators.c b/libnumtext_remove_separators.c
index e92c800..cbeb80a 100644
--- a/libnumtext_remove_separators.c
+++ b/libnumtext_remove_separators.c
@@ -13,6 +13,11 @@ libnumtext_remove_separators(char *outbuf, size_t outbuf_size, const char *num,
case LIBNUMTEXT_SWEDISH:
for (; num_len--; num++) {
if (*num != ' ' && *num != '\'' && *num != '.') {
+ if (IS_UNICODE_NBSP(num, num_len)) {
+ num = &num[sizeof(UNICODE_NBSP) - 2];
+ num_len -= sizeof(UNICODE_NBSP) - 2;
+ continue;
+ }
if (outbuf_size) {
*p++ = *num;
outbuf_size--;