[pgAdmin4][Patch]: Regarding RM#1419 - Internal Server Error displayed if create any object through simplified Chinese character - Mailing list pgadmin-hackers

From Surinder Kumar
Subject [pgAdmin4][Patch]: Regarding RM#1419 - Internal Server Error displayed if create any object through simplified Chinese character
Date
Msg-id CAM5-9D80C1BH7xENfmrzjo+RS_=N1ijBx7chvDykBUtarSUfrA@mail.gmail.com
Whole thread Raw
Responses Re: [pgAdmin4][Patch]: Regarding RM#1419 - Internal Server Error displayed if create any object through simplified Chinese character  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
List pgadmin-hackers
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.

@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



Attachment

pgadmin-hackers by date:

Previous
From: Michael Hornick
Date:
Subject: pgAdmin 4 feedback
Next
From: Murtuza Zabuawala
Date:
Subject: Re: [pgAdmin4][Patch]: Regarding RM#1419 - Internal Server Error displayed if create any object through simplified Chinese character