Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWspI-004bF2-BE for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Aug 2023 06:19:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qWspG-008jqA-9s for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Aug 2023 06:19:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWspF-008jq2-9i for pgsql-bugs@lists.postgresql.org; Fri, 18 Aug 2023 06:19:14 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWsp7-000lCv-El for pgsql-bugs@lists.postgresql.org; Fri, 18 Aug 2023 06:19:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 637F45C00EF; Fri, 18 Aug 2023 02:19:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 18 Aug 2023 02:19:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1692339544; x=1692425944; bh=m5 A9NcqxP/wc72mf+ycfz0H7qaAYes1S2x/5LLV2SnE=; b=wgj9OzyaLTjBtWEKzs SjHII4PPjQEgRh+KAMoMnovLRJ6enB1jKJZnPRE0Q98UuLYv+BGDjBOxrzDhg2NB 9ztg9VnjntIAlGNZXrrKKTGwtijtxmxmWVzBYtX3yeIVEaGISsASKmqkrmjarxAP voGTkG2nlWN/ykq9IgXIoAmjQvx5qlX6575sSGwRm6s3ZH2/1XeJwc6dt4jQIYlL MoR3KFZUhvk5IUUlChV1oeTaEnz+46EAHSfI0CZqlsZoRDRy1U1zer3yIw/5UiLf 8apLK9cCBixnxI+XH517LVzGpZxLg1zq7DXZpj82vY0LwhNnQb2XDhWToEwYdlMo wHDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1692339544; x=1692425944; bh=m5A9NcqxP/wc7 2mf+ycfz0H7qaAYes1S2x/5LLV2SnE=; b=1b06RlQT/KM9tjVkeiVXZVVnP9V9P Nzf5adtKSqKzazSXp/qEKCCv9OcGBtSOJNJJiphS3CVsUkrMM3wwrd8jWfpUwLgO Q4C7ZAVSq4fGUlod3FAQ9t8F8G8Rm46lJeKa/WOVVC/q7KK3pUKEnilhm5ujQIsq xey+oXhzQvugHgX/7I62EQKhT0J3ZAa660pgPD8hfbPL1ZxYmLogu0t+TK43lVus CKBHOKubl2ysBqHztFET7zo9iyN+SNaggmU4OKcGsniyELCybUXEyEiJQVJBAtma tzCdCWDG5uzBGSsevI9kLlLgP6DMQrvEtzadzc3GfCyIakTrQRB+MpgwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudduvddguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhepff fhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepffdufeeflefghfekudekkeevvddugfeiteekkeduleefvefhhffftdduffeiuedt necuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghr rdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Aug 2023 02:19:02 -0400 (EDT) Date: Fri, 18 Aug 2023 15:18:58 +0900 From: Michael Paquier To: martin@schlossarek.me, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18057: unaccent removes intentional spaces Message-ID: References: <18057-62712cad01bd202c@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MJNwkGkk3wx2Kn3w" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --MJNwkGkk3wx2Kn3w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 16, 2023 at 09:00:43AM +0900, Michael Paquier wrote: > Agreed that this looks incorrect as-is. This goes as far as 9a206d0 > when these has been introduced, and it looks like the culprit is > around initTrie() where the entries are loaded. See around t_isspace, > for example. I was looking at the code, and my first impression was right. All leading and trailing whitespaces between the two characters listed in the rule file are discarded. The thing is that we clearly document the parsing rules for the sake of any custom files one can feed to the extension: https://www.postgresql.org/docs/devel/unaccent.html I am not sure what we can do here. Doing nothing is certainly an option, but I am wondering if we could put in place an extra rule where whitespaces can be part of the translated character if it uses double quotes, for example. Thoughts? -- Michael --MJNwkGkk3wx2Kn3w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmTfDVIACgkQnvQgOdby QH2++Q//fuqYViCpSwTUCnjfB9NhIm+vt8wN3J9/kL5xjcnmopRZm90pZzjA7gqB TanSAv8hiUt5WN1sSyWsG3iB6lqVQC7gGxztB/GRauBM16DswDAMxO7hCAudc1nZ OUoxxeWogoU1lDW6g2uwr8NEk0efLAnYDRIAkAKPVBMKk0eOU5wkEhcWwOEKNYop gy0XjWVupeJOYIfBKkxQ8aUOPhSuLy2NEVb0mMzWlsneh7s8Pa8quKCrdvOynogz 5M4sgPWIfekNW/BkrEvlLenfYTxp0QDO1IQzRpZdrPrmfcywZ/GA1RUpHSvocGTp gEaqe+ZueS+6J8NITIrNikeFJJZjQEAyAxgTUNb1XvU3JhELWBle4IobhQG6iEEq 7cCluHIVPEhc63cVx4ey8qd3aAWpm0NfTlVHhmz7cAEPghiO6W4Gybb5Ck9UTJBa UeINW/2MpoIH83BZTIv/HeHlYPtGQFA/Q5OF3tMgOnfjqW5nQfgGCqXmXEDQTI92 T1RdiuOknIxYb37DMAZiLYePwY6rhc7GO/H8WumKkekVjI40jBoKwumNv2sXDBDM n7Jg98d+0BFu6aQc+TbAQvUyLc0TnreE3lnyrWwDoLcRve1NpOBfWY0NAZKVzeYX iiJi/6fVoftvC6ofx1oyqFYIOgK8YZVCBgbIHygOrmtlEJEQJfU= =q5H+ -----END PGP SIGNATURE----- --MJNwkGkk3wx2Kn3w--