Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYXHm-0006E9-1b for pgsql-general@arkaria.postgresql.org; Sun, 27 Mar 2022 18:06:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYXHj-0001rW-KV for pgsql-general@arkaria.postgresql.org; Sun, 27 Mar 2022 18:06:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYXHj-0001rM-7a for pgsql-general@lists.postgresql.org; Sun, 27 Mar 2022 18:06:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYXHf-0000yH-B6 for pgsql-general@lists.postgresql.org; Sun, 27 Mar 2022 18:06:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22RI6Pwo386727; Sun, 27 Mar 2022 14:06:25 -0400 From: Tom Lane To: Alvaro Herrera cc: Ralf Schuchardt , Marco Lechner , pgsql-general@lists.postgresql.org Subject: Re: support for DIN SPEC 91379 encoding In-reply-to: <202203271747.p2lx5is5rdtj@alvherre.pgsql> References: <202203271747.p2lx5is5rdtj@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Sun, 27 Mar 2022 19:47:23 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <386725.1648404385.1@sss.pgh.pa.us> Date: Sun, 27 Mar 2022 14:06:25 -0400 Message-ID: <386726.1648404385@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2022-Mar-27, Ralf Schuchardt wrote: >> linked here https://www.xoev.de/downloads-2316#StringLatin it is said, >> that the spec is a strict subset of unicode (E.1.6), and it is also >> mentioned in E.1.4, that in UTF-8 all unicode characters can be >> encoded. Therefore UTF-8 can be used to encode all DIN SPEC 91379 >> characters. > So the remaining question is whether DIN SPEC 91379 requires an > implementation to support character U+0000. If it does, then PostgreSQL > is not conformant, because that character is the only one in Unicode > that we don't support. If U+0000 is not required, then PostgreSQL is > okay. Hmm ... UTF8 as defined in RFC3629/STD63 [1] does not allow "all unicode characters to be encoded". It disallows surrogate pairs (U+D800--U+DFFF) and code points above U+10FFFF. We follow that spec, so depending on what DIN 91379 *actually* says, we might have additional reasons not to be in compliance. I don't read German unfortunately. regards, tom lane [1] http://www.faqs.org/rfcs/rfc3629.html