Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtPWl-00067w-HM for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 04:18:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtPWk-0003ph-3e for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 04:18:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtPWj-0003pZ-SM for pgsql-hackers@lists.postgresql.org; Tue, 12 Feb 2019 04:18:33 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtPWd-00085w-7y for pgsql-hackers@lists.postgresql.org; Tue, 12 Feb 2019 04:18:33 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id CD5BC3045; Mon, 11 Feb 2019 23:18:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 11 Feb 2019 23:18:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=7Ht42inmuRO6Wwi2DADYx0zF0ZF hFg0bxzAr2AIgz/0=; b=T578JIti6jQr52NSGGwRbGX6XxQZj3c/b6r+S7UdVMf 5vUBnALy5diWY8BisuA/V9laXo8cX1DrclFl2/Jfus2LMEivYcmHqEzBez3cL5P9 q99neg3A2sx1J8K6Mw0QY0aTJ7MIKOnreCLyXAS83aJZ55hsLVRvhALakR6ZxopJ dLp7MeDTgq14L63r5vOXAAI+QMDAN0uILEV4mVd+f6chSs3wsjClmhyjtWl5myCh bkHehhDwDQZc3KFPLrCsT0Bepb8AmSGCrIoGzH6N+W041QPqBPhUxThQE1XKHnTb hdhhu7j9MQnqdoiTgMDxBfKIFafBRB2tQqXcqF9at7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=7Ht42i nmuRO6Wwi2DADYx0zF0ZFhFg0bxzAr2AIgz/0=; b=GXUi48zxtdAyYIYzqzWxz3 mNWWophKO2bZquo6u8s+nRVYQ1jofIknYEnZdwaifIhOcD16G8tlYw14zmbdHQxZ 0W5MX/IC9JsHePIwm6rgxpXmFoRgowFEHtasGNTmMuvqLzkVSeHAWyYbcHPxUsIP 1ufCa37Gc0yemxHP18T8mJiZL8iaDaxz12hixuB5L39ymCxftDu13meBBGoQO9Ae FG76x5Gg+M7/b5Recl5WcCWgzI190X9Gd+DOfcRh4mlOYQjL0mpAdGolFvNJSfq/ a9Tm+TZ923FICy1LJyT3dmSrdGOfvO6m4wF4n8i5p7mds3CtqmE+2C1i7wI/hILw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddttddgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 8CB7BE4543; Mon, 11 Feb 2019 23:18:22 -0500 (EST) Date: Tue, 12 Feb 2019 13:18:19 +0900 From: Michael Paquier To: Ramanarayana Cc: Hugh Ranalli , pgsql-hackers@lists.postgresql.org Subject: Re: BUG #15548: Unaccent does not remove combining diacritical characters Message-ID: <20190212041819.GK1475@paquier.xyz> References: <15548-cef1b3f8de190d4f@postgresql.org> <154982918542.11785.1374991294537224097.pgcf@coridan.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aziWXe2aaRGlkyg3" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --aziWXe2aaRGlkyg3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 12, 2019 at 02:27:31AM +0530, Ramanarayana wrote: > I tested the script in python 2.7 and it works perfect. The problem is in > python 3.7(and may be only in windows as you were not getting the issue) > and I was getting the following error >=20 > UnicodeEncodeError: 'charmap' codec can't encode character '\u0100' in > position 0: character maps to >=20 > I went through the python script and found that the stdout encoding is s= et > to utf-8 only if python version is <=3D2. >=20 > I have made the same change for python version 3 as well. Please find the > patch for the same.Let me know if it makes sense Isn't that because Windows encoding becomes cp1252, utf16 or such? FWIW, on Debian SID with Python 3.7, I get the correct output, and no diffs on HEAD. Perhaps it would make sense to use open() on the different files with encoding=3D'utf-8' to avoid any kind of problems? -- Michael --aziWXe2aaRGlkyg3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxiSQsACgkQnvQgOdby QH1F/w//ZGOYAP9SLDjjpuOs0A7mWLwt8e2fADJ/vY0LlAIk7zFYyu35gfNioCHc cQjCJm8moahzKlbziVJCr1IS3DsjnUVUD/+o9Bb5TQ8F/rDKsHivK5kztOOIYQ0+ GexUz8W+/Kxe5Xzhkx14TCBwzucykRmAZGxEQYorJzwKBJ2Fix3wveyvkuN5t3t7 G5KK0H4/R4fy5w6+XoF66LHVOA6MZWQwIxrnl3pV6OushX7ES+/fXGed79F3fcF/ s1ZpZez4CaNNKJ2kdUNltYVXz+fRfwfgFQnkxlJ3Emxwm1Fv2Z0kHxkKHoiKqQSN pvd2S3snFKf3h7oeL1GpZ0V+Jc8FGhzqJpJY2PuWH9hnLmtlccq3w8z2qJzwIeRk FqZVPe4IuSJtjsEPZu8ZCKg6bvYg1OfkjitsZcR2LRWsXDrUQmhzvP0zpK2Lv5El 8QgMMZa4CkB7DPMureRERY//FhY1NEyIuuiDYR5QlaHQMCmdPyXgVva5HxH8pWUD von9ndll+Tm7mq5Qw/OeW/NDODcLCbNQxi6phQeb5kGFTKqGKY91yhJNbYAtdKYT QuywBuuHpVSejpW2Q0qV8gROGKkzxTbfYgPpAJDX2+ZzenhkWcH18wI1Kxq/MYJc /32T5ddTh1nWNKTqeZsEvcgEpZ1wjvAz8ZroYf8+dW8PKnUqRyI= =csMp -----END PGP SIGNATURE----- --aziWXe2aaRGlkyg3--