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 1rClhI-00HAZk-OG for pgsql-general@arkaria.postgresql.org; Mon, 11 Dec 2023 19:12:09 +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 1rClhF-00GLot-DQ for pgsql-general@arkaria.postgresql.org; Mon, 11 Dec 2023 19:12:05 +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 1rClhD-00GLo7-Ke for pgsql-general@lists.postgresql.org; Mon, 11 Dec 2023 19:12:05 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rClh9-009uxU-PG for pgsql-general@lists.postgresql.org; Mon, 11 Dec 2023 19:12:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 68F2432003D3; Mon, 11 Dec 2023 14:11:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 11 Dec 2023 14:11:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding: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=fm3; t= 1702321915; x=1702408315; bh=mBr2gYPOQodF25bClS+58Rf4XXLjTTrEu6N QXQw/d0w=; b=lsG9zZzupZczF74yGSykHYmVrybOj4L2VaOyhYGVmVJFhw8J4DN wqO461TUvK5sPVaozIjrFH4u8Yl7jcorvcL4Fr4QNYX9iVp6umOizQTVQyg9iyo1 9kzSo5zWSoTTB2kCJs84vzGAJyHQ/oBCXOSAGIm/0Xrs5Lp1d4WGCwRyxz0FR/ML lmAreVg6dteiWU9HCnoTpKf5WWQ4c74KZlElbXGSGMk2/fdleJWqVmSWChFYH29s MRk4qG+SCG/mdxPIKsd8i5kDB1S4UyrIzlGsVAqqkLGxuLdXAeBEDuHHd2Op6yHE erdRYIG8Esup5Xvo4Eob8EufTQGiNyotQyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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= 1702321915; x=1702408315; bh=mBr2gYPOQodF25bClS+58Rf4XXLjTTrEu6N QXQw/d0w=; b=3E0lJmECa5ugpNJsHN1f0ubOB94jOfgRr+pMOFGNlxQurEqkwBq RjKBVLzy1ZLSSxlRShmfTCx2UK1ZRpHDjc7LoxneVqDvK4izYufBH1C6CLy69Fun UqfJyW9qmH408JgKdXIc7go3YoRH3vLkNXPZHeTmNwMLewT0LJ4btrKqHZFoBPPg hJsX/dw9qj2e918VeedftZv9HRbDM96LJHXAK/oM9fluYejwZRV07r+JZMc8/8c7 T0nOOSie8jabDtgLRVcXv73ASMVuHd+VkhjAmotY9ubXKqWMysgjuyRD5LVX1tNt 1oEU+X6CUWmFSkvoI02dyzvj68RjfoGRJ8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelvddguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptegu rhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrd gtohhmqeenucggtffrrghtthgvrhhnpeefgeefieeutdfggfetgefgheekjeehteeileei gfetieekjedvieeviefgheevtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Dec 2023 14:11:53 -0500 (EST) Message-ID: <57df4d8f-dc95-43a1-8aec-a8c2c9fe721b@aklaver.com> Date: Mon, 11 Dec 2023 11:11:52 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: how can I fix my accent issues? To: Igniris Valdivia Baez , Laurenz Albe Cc: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/11/23 10:54 AM, Igniris Valdivia Baez wrote: > hello to all, thanks for your answers i've changed the encoding using this: > ALTER DATABASE testdb > SET client_encoding = WIN1252; > > now when we try to select data from a table we get this error: > > ERROR: character with byte sequence 0xe2 0x80 0x8b in encoding "UTF8" > has no equivalent in encoding "WIN1252" SQL state: 22P05ERROR: > character with byte sequence 0xe2 0x80 0x8b in encoding "UTF8" has no > equivalent in encoding "WIN1252" SQL state: 22P05 That is not surprising as your database has per a previous post from you: "... postgres 15 and UTF8 with collation en_US.utf8 ..." It is entirely possible there are values in the database that have no corresponding sequence  in WIN1252. At this point you will need to stick to UTF8. > > i want to clarify that the postgres on dev is in a docker environment > that already have databases in it so we can't change encoding for the > hole container > > thanks in advance > > El sáb, 9 dic 2023 a las 1:01, Laurenz Albe > () escribió: >> On Fri, 2023-12-08 at 23:58 -0500, Igniris Valdivia Baez wrote: >>> hello, I have an ETL process collecting data from a postgresql >>> database and xls files and inserting in a postgresql database that >>> process occurs great in a local DB in postgres 14 with UTF8 >>> codification and Spanish_Cuba.1952 collation but when I execute that >>> process in dev which is in postgres 15 and UTF8 with collation >>> en_US.utf8 the words with accents and ñ looks like an interrogation >>> symbol, what can I do to fix this? >> If the data you are sending are encoded in WINDOWS-1252 (I assume that >> "1952" is just a typo), you should set the client encoding to WIN1252, >> so that PostgreSQL knows how to convert the data correctly. >> >> You can do that in several ways; the simplest might be to set the >> environment variable PGCLIENTENCODING to WIN1252. >> >> Yours, >> Laurenz Albe >