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 1oZDr4-0004vF-3Q for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Sep 2022 16:06:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oZDr2-000155-NB for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Sep 2022 16:06:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZDr2-00014w-ET for pgsql-bugs@lists.postgresql.org; Fri, 16 Sep 2022 16:06:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZDqz-00036s-QQ for pgsql-bugs@lists.postgresql.org; Fri, 16 Sep 2022 16:06:12 +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 28GG67jL3702541; Fri, 16 Sep 2022 12:06:07 -0400 From: Tom Lane To: Souvik Chatterjee cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae In-reply-to: References: <17615-6d24c25ba0e8a9e6@postgresql.org> <3421821.1663270405@sss.pgh.pa.us> <3551124.1663297750@sss.pgh.pa.us> Comments: In-reply-to Souvik Chatterjee message dated "Fri, 16 Sep 2022 21:18:52 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3702539.1663344367.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 16 Sep 2022 12:06:07 -0400 Message-ID: <3702540.1663344367@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Souvik Chatterjee writes: > So you meant to say registered trademark: ® > is not a valid UTF-8 character? I'm sure that there is such a Unicode character, but the way you are presenting it to the database is not UTF-8. It's some other character encoding, probably a single-byte encoding such as a member of the ISO 8859 family [1]. I see in the table there that code 0xAE is the trademark symbol in 8859-1 (LATIN1) and some but not all of the other variants. You need to arrange for the proper encoding conversion to happen. Perhaps reading [2] would help. regards, tom lane [1] https://en.wikipedia.org/wiki/ISO/IEC_8859 [2] https://www.postgresql.org/docs/current/multibyte.html