Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMuhh-0004PB-OH for pgadmin-hackers@arkaria.postgresql.org; Tue, 12 Jul 2016 10:14:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bMuhh-0000rh-AP for pgadmin-hackers@arkaria.postgresql.org; Tue, 12 Jul 2016 10:14:13 +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.84_2) (envelope-from ) id 1bMuhg-0000rY-RR for pgadmin-hackers@postgresql.org; Tue, 12 Jul 2016 10:14:12 +0000 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bMuhX-00060r-Vv for pgadmin-hackers@postgresql.org; Tue, 12 Jul 2016 10:14:11 +0000 Received: by mail-qk0-x22c.google.com with SMTP id p74so9099544qka.0 for ; Tue, 12 Jul 2016 03:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fGZ7+QiWRIk61+U10GdcHelWrF7VFZB6UMudyG8KDKs=; b=zfQeFdh2uHogo21ulQ9bTEmFi+k5D38q0RnumIgS9WG+3ky69A1I5uZRXNWJe62iSh NwqesTWbHH5QaC2KNsDS+hug7BatVAnTb1RVn8h5wSZuefNbwde5pwFqoA8wlqR6/Lti 6646igQS3Mr2gdAFKycyxe+vUOJr2E4JuJMeyH70ENGxk+hhcI/+xAA3Q48oBd5P8lSF nP6yGgZajpqRs03R8b1P68zQF79Y/TFFjIZx1kXVpglNHbG8m+pQMe/1PmZyAXgRU5VE FP4nnhdEv3B7XWjpHb8wtsujGKShx2ieOjHCt1/sDPN7eQX1g7DfZc1vxppsTrmCKN5L zW9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fGZ7+QiWRIk61+U10GdcHelWrF7VFZB6UMudyG8KDKs=; b=fIyD379WaP7cq0mT/8gvZ/YVmcgzKEI2zt11MnDZEBgAB6KbKltImw3A0VLALBoQ1v TVoDLPESTx0tinun9grHFMBl56HHqXm1t5GPmNWGYIkzTlCqKHV3KD4wbF6I3c01qBtk McHLerSsIEXTWt6BY6QXxZ77pJoe6px1PwqNrr7nNM+979HFrMYHQR5n8zExBrOeuDIO kNfqGCdaC1xTwCm06X2dL1HUYmoiFdtCYpH96cB7SfOEBtaVrc+7BedSoHb/YbxnEsfY b+Ysk3uPlpZzUcOeigzoFwDv8USy0Lb19+Bhn+rJv9pvwXP0LRrXUgboDDCF/qLTewXB HzAw== X-Gm-Message-State: ALyK8tKlZoMINVbDhpKBFqDPpNnmW9evR+gP9a4q6zrr3RsOvZgwcN/4fARv5vbDKo6ITvIctNJ/A+N+PWjtP9PJ X-Received: by 10.55.188.198 with SMTP id m189mr1767043qkf.134.1468318442027; Tue, 12 Jul 2016 03:14:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.8.3 with HTTP; Tue, 12 Jul 2016 03:13:42 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Tue, 12 Jul 2016 15:43:42 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: Regarding RM#1419 - Internal Server Error displayed if create any object through simplified Chinese character To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=94eb2c048d2427935305376d8795 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --94eb2c048d2427935305376d8795 Content-Type: text/plain; charset=UTF-8 Hi, Just a heads up, This issue is occurs only in runtime & If you try in web everything works fine when you provide unicode characters as object name. Now sure but the issue is when runtime(QtWebkit) sends data it does not encodes it properly & this should be generic fix in runtime. Regards, Murtuza -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Tue, Jul 12, 2016 at 3:27 PM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > Hi > > *What is happening in code?* > Database is created with Chinese characters successfully with ascii > values(Chinese characters converted to ascii) before saving internally. > > but when database properties is retrieved by name, it fails to fetch data > and throws UnicodeError. > > *Solution:* > Database name should be encoded in 'utf-8' before storing to database. > This resolved the issue. > I have tested this patch by creating database name using Japanese and > Chinese characters. It works. > > Also referenced the code to *set default encoding to 'uff-8' *before > start of application. > https://github.com/joeyespo/grip/issues/86 > > @Ashesh/@Dave can you please review the patch? > If it looks good, we can do the same changes in case of other nodes. > > Thanks, > Surinder Kumar > > > > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > > --94eb2c048d2427935305376d8795 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Just a heads up, This issue is occu= rs only in runtime & If you try in web everything works fine when you p= rovide unicode characters as object name.

Now sure= but the issue is when runtime(QtWebkit) sends data it does not encodes it = properly & this should be generic fix in runtime.

<= div>Regards,
Murtuza

--
Regards,
Murtuza Zabuawala
<= span style=3D"color:rgb(136,136,136)">EnterpriseDB:=C2=A0http://www.enterprisedb.com
The Enterprise Postg= reSQL Company


On Tue, Jul 12, 2016 at 3:27 PM, Surinder Ku= mar <surinder.kumar@enterprisedb.com> wrote:
Hi

What is happening in code?
Database is created with Chin= ese characters successfully with ascii values(Chinese characters converted = to ascii) before saving internally.

but when datab= ase properties is retrieved by name, it fails to fetch data and throws Unic= odeError.

Solution:
Database name= should be encoded in 'utf-8' before storing to database.
This resolved the issue.=C2=A0
I have tested this patch by creat= ing database name using Japanese and Chinese characters. It works.

Also referenced the code to set default encoding to = 9;uff-8' before start of application.

@Ashesh/@Dave can yo= u please review the patch?
If it looks good, we can do the same c= hanges in case of other nodes.

Thanks,
S= urinder Kumar





--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers=


--94eb2c048d2427935305376d8795--