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 1qnnyd-00C4KV-9q for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Oct 2023 22:34:51 +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 1qnnyb-009Wfh-Q2 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Oct 2023 22:34:50 +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 1qnnyb-009Wf6-Dl for pgsql-hackers@lists.postgresql.org; Tue, 03 Oct 2023 22:34:49 +0000 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qnnyZ-00838a-0N for pgsql-hackers@postgresql.org; Tue, 03 Oct 2023 22:34:48 +0000 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3ae1916ba69so915124b6e.2 for ; Tue, 03 Oct 2023 15:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1696372486; x=1696977286; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=YYK1+r+iK/MhQB3tnH9V4WP22jqqPAeufcSREDqR8ek=; b=YvKkPLxVxhhVAJZZ05wgUPtxkmUJ+6ah6wT8epgnJf12UFH8PCp5/pOevN09ugyrD+ F9ZmeGNmrYNl0YK+loTwOaqUMzkhQQB04WsVsZlE5KMn/Zfod4ELlVe7qlnbw79T5dW6 /MOrsBkB9gcJlUB5Xj5pR+COUy0piJklIApGNAleSynpTr411d3H2kLX20SdRjnMMqck C0BeaIYyThgYXHCfBEayJo2aeTX65aX4tiKq35hepuvb19QMvoMzoTrxQR3pdFCugAEG nlg8bFXOU354Hg+J+APNlDxcbI3SWalpQE1KrKDqWC3XtFDMVMUWwZDcCDDG/psjcfiX +CQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696372486; x=1696977286; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YYK1+r+iK/MhQB3tnH9V4WP22jqqPAeufcSREDqR8ek=; b=EuzOSidsZriC6xsr75FdGVkPoFw57TLMn2+yVfFFARQAqhcZ/K9Ew9PDDDSoMFa8n5 G8L9faoPEMhmV8N7MNR/9z7vS6gZtfaxfY/Ox7IqHdTbj4tIoZhqM6hRzEF9xY9/GUB9 lG386Ux8KnoGfzcjwJ5hLhPS2Uo2AflKgoa65/WNFE6zaPq7lX//hweuI+CbP2Abj6Yo j11BkXGH3ZFFtaFUUEa69tvPx+LBV11ImKguxflvRXQHL5mE8IBuWbZp66nh19AJa+63 uQk8pvXcOAjuF3uNFMZ47LXLCWtUBba+06FWW6An1p7WsxD2MghqVyiJ8iXmT29gNKLI h1xA== X-Gm-Message-State: AOJu0Yz/8R+CuRQoCJkVkWBOjRO8eRcOTZgxwId0NCGLcqzTk1wTBeEF vZK0XmwwgaFYyHQimbUZHB98YyMhh8xJghGJKe4= X-Google-Smtp-Source: AGHT+IHW/uTh7LMMGVZ2GA/WY5zx6Oh2oKMn3Rgnh8VPik23z9QTbYywSke8t9uSHYevYdEP67/AeQ== X-Received: by 2002:a05:6808:3025:b0:3a3:6cb2:d5bf with SMTP id ay37-20020a056808302500b003a36cb2d5bfmr1060590oib.4.1696372486377; Tue, 03 Oct 2023 15:34:46 -0700 (PDT) Received: from [172.18.10.34] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id i67-20020a639d46000000b005782ad723casm1875754pgd.27.2023.10.03.15.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 15:34:45 -0700 (PDT) Message-ID: Subject: Re: Pre-proposal: unicode normalized text From: Jeff Davis To: Nico Williams Cc: pgsql-hackers@postgresql.org Date: Tue, 03 Oct 2023 15:34:44 -0700 In-Reply-To: References: <23edd434b490f74a82b564b8027b6a52059f8de7.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-10-03 at 15:15 -0500, Nico Williams wrote: > Ugh, My client is not displying 'a' correctly Ugh. Is that an argument in favor of normalization or against? I've also noticed that some fonts render the same character a bit differently depending on the constituent code points. For instance, if the accent is its own code point, it seems to be more prominent than if a single code point represents both the base character and the accent. That seems to be a violation, but I can understand why that might be useful. >=20 > Almost every Latin input mode out there produces precomposed > characters > and so they effectively produce NFC. The problem is not the normal case, the problem will be things like obscure input methods, some kind of software that's being too clever, or some kind of malicious user trying to confuse the database. >=20 > That means that indices > need to normalize strings, but tables need to store unnormalized > strings. That's an interesting idea. Would the equality operator normalize first, or are you saying that the index would need to recheck the results? Regards, Jeff Davis