Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erQ6G-0007gd-Db for pgadmin-hackers@arkaria.postgresql.org; Thu, 01 Mar 2018 15:26:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erQ6F-00086U-9c for pgadmin-hackers@arkaria.postgresql.org; Thu, 01 Mar 2018 15:26:27 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1erQ6F-00086K-4F for pgadmin-hackers@lists.postgresql.org; Thu, 01 Mar 2018 15:26:27 +0000 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1erQ67-0002z4-28 for pgadmin-hackers@postgresql.org; Thu, 01 Mar 2018 15:26:25 +0000 Received: by mail-io0-x22d.google.com with SMTP id d71so7486102iog.4 for ; Thu, 01 Mar 2018 07:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AuroSZbAF82i0+wPoc4JL9zPTFajdIIqeoWYVCKJKA4=; b=n29JhArJqQ1pi+HVotNSrhue850OhFUZZRtidbUUR5f8W4NAeM2hPHCFdv9wv71fHY pUdPz0ISvUK66hokGTPRQlHzKu33ugidHz/KlliinSeKgAy5QIhIdrpRcVzxSup3fbaS VZEnnaBzntSU/v7uhOBVzzqTii5S6zgOdT5AptoZJIzfNkf4hU8JhVDo4WsLqa6CktPC /TXh6fFloBRnOEZjzKGf1nHGcVdbEvYrSpxEsJS+eakN/BMwUdfJ4w+qR+CPedxNpjul ZIqB3pIWed6fSGhtdr8Y6xdtQuXaQdSxlgi4WWG+QnZocnrsGEVwQym4R7/fQ9hpXAKG ElYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AuroSZbAF82i0+wPoc4JL9zPTFajdIIqeoWYVCKJKA4=; b=Ql2FPet/9cLrBu027QQFY0zI57vXMdEOdkA6HVkE/4cyrCv6ffs8DSgxXfGy0qBE89 dT8fSKkVTfOp2JsKcDcQQI4MfZ/k9Oedi6Jcc2QWtiTySDT1ZDmSt6xA8Gvy0Wn/EqnC 96mrdY/BqLgRWw+C3/EpHdkmpvqdjVT8ZCkuTpnmuHEb/1gLsqWwPJ35EK6kkzK9sHbX 0rbLEEddsCXHIZs8fJKcfTfTLeldaFKQ2LXe8584eY/0d1gcnFQZM2R1+hLzMXfFHr/5 /SgOOaRYpRy/qIxCZeILQ15F4mhHJp4WUy9DZrngVxIIDq5edsidrzXEEQDUU3RcNOX7 RsJQ== X-Gm-Message-State: AElRT7H9+geVhzyoFOnCoGSxZ7VyTw/JqzTqmWoQK1pWmq7V/gAYZ4DG Xu1BNpt1f3yzKqQn0dbIbyj/po6XSjI/9yt2F9PFZQ== X-Google-Smtp-Source: AG47ELt2da5yHZzaQzkTmB2aCkRj9T8+mYTExTY1yXvWOH/rNAEAKOo+pSd22/Ib9Mtw8vEjsB3xgXa8geM0U932HYE= X-Received: by 10.107.200.69 with SMTP id y66mr2359019iof.116.1519917976430; Thu, 01 Mar 2018 07:26:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Thu, 01 Mar 2018 15:26:06 +0000 Message-ID: Subject: Re: [pgAdmin4][RM#3129] handle encoding issue in File manager To: Murtuza Zabuawala Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="94eb2c0b9ace12c39d05665b7b41" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --94eb2c0b9ace12c39d05665b7b41 Content-Type: text/plain; charset="UTF-8" Hello Murtuza, The code looks pretty good, love the fact that you extracted it so that our file size stop growing and get more manageable. All tests pass on our CI. The only issue I found was linting: pycodestyle --config=.pycodestyle pgadmin/tools/sqleditor/ pgadmin/tools/sqleditor/utils/query_tool_fs_utils.py:12: [E302] expected 2 blank lines, found 1 pgadmin/tools/sqleditor/utils/query_tool_fs_utils.py:53: [W391] blank line at end of file pgadmin/tools/sqleditor/utils/tests/test_query_tool_fs_utils.py:27: [E121] continuation line under-indented for hanging indent pgadmin/tools/sqleditor/utils/tests/test_query_tool_fs_utils.py:29: [E122] continuation line missing indentation or outdented 1 E121 continuation line under-indented for hanging indent 1 E122 continuation line missing indentation or outdented 1 E302 expected 2 blank lines, found 1 1 W391 blank line at end of file 4 When this is fixed I think we are good to go Thanks Joao On Thu, Mar 1, 2018 at 3:01 AM Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > PFA patch to fix the issue where user was not able to open the file with > non utf-8 encoding. > > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > --94eb2c0b9ace12c39d05665b7b41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Murtuza,

The code looks pretty go= od, love the fact that you extracted it so that our file size stop growing = and get more manageable. All tests pass on our CI.

The only issue I found was linting:

pycodest= yle --config=3D.pycodestyle pgadmin/tools/sqleditor/
pgadmin/tool= s/sqleditor/utils/query_tool_fs_utils.py:12: [E302] expected 2 blank lines,= found 1
pgadmin/tools/sqleditor/utils/query_tool_fs_utils.py:53:= [W391] blank line at end of file
pgadmin/tools/sqleditor/utils/t= ests/test_query_tool_fs_utils.py:27: [E121] continuation line under-indente= d for hanging indent
pgadmin/tools/sqleditor/utils/tests/test_que= ry_tool_fs_utils.py:29: [E122] continuation line missing indentation or out= dented
1=C2=A0 =C2=A0 =C2=A0 =C2=A0E121 continuation line under-i= ndented for hanging indent
1=C2=A0 =C2=A0 =C2=A0 =C2=A0E122 conti= nuation line missing indentation or outdented
1=C2=A0 =C2=A0 =C2= =A0 =C2=A0E302 expected 2 blank lines, found 1
1=C2=A0 =C2=A0 =C2= =A0 =C2=A0W391 blank line at end of file
4

When this is fixed I think we are good to go

<= div>Thanks
Joao

On Thu, Mar 1, 2018 at 3:01 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.co= m> wrote:
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;color:#= 444444">Hi,

PFA patch to fix the issue whe= re user was not able to open the file with non utf-8 encoding.


--
Regards,=
= Murtuza Zabuawala
EnterpriseDB:=C2=A0http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company

<= /div>
--94eb2c0b9ace12c39d05665b7b41--