BUG #18057: unaccent removes intentional spaces

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: martin(at)schlossarek(dot)me
Subject: BUG #18057: unaccent removes intentional spaces
Date: 2023-08-15 19:54:57
Message-ID: 18057-62712cad01bd202c@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18057
Logged by: Martin Schlossarek
Email address: martin(at)schlossarek(dot)me
PostgreSQL version: 15.1
Operating system: Fedora 38
Description:

I discovered that the unaccent extension also removes intentional spaces
that are explicitly specified in the accent.rules. As far as I see it
correctly, all fraction characters are affected, for example:

```sql
# select unaccent('1½');
--- expected output: 1 1/2
--- actual output: 11/2
```

Affected characters:
```bash
$ curl -s
"https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=contrib/unaccent/unaccent.rules;hb=HEAD"
| grep -E " "
¼ 1/4
½ 1/2
¾ 3/4
⅐ 1/7
⅑ 1/9
⅒ 1/10
⅓ 1/3
⅔ 2/3
⅕ 1/5
⅖ 2/5
⅗ 3/5
⅘ 4/5
⅙ 1/6
⅚ 5/6
⅛ 1/8
⅜ 3/8
⅝ 5/8
⅞ 7/8
⅟ 1/
↉ 0/3
```

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andy Fan 2023-08-15 23:34:02 Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used
Previous Message Heikki Linnakangas 2023-08-15 14:40:53 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG