BUG #15417: 'ascii' codec can't encode characters

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: keramati_hossein(at)ae(dot)sharif(dot)edu
Subject: BUG #15417: 'ascii' codec can't encode characters
Date: 2018-10-03 12:32:56
Message-ID: 15417-e2f4ecad8302a0bf@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15417
Logged by: Hossein Keramati
Email address: keramati_hossein(at)ae(dot)sharif(dot)edu
PostgreSQL version: 10.5
Operating system: linux
Description:

I have a django application on server that use postgresql database with UTF8
encoding and C.UTF8 for collation and ctype and on my localhost I use
sqlite3 as database.
I put some Persian characters on my database and it works properly on my
localhost but on server when I send a request it works for some models of my
database and doesn't work for some other, with this error:
" 'ascii' codec can't encode characters ".

I tried with different collation and ctype including fa_IR.UTF8 but the
result was worse.
All of my controllers follow same logic and methods and I can't understand
how it's possible to work for some controllers and don't work for others.

what's the solution?

---
my pip freeze:
Django==2.0.7
gunicorn==19.9.0
mysqlclient==1.3.13
psycopg2==2.7.5
psycopg2-binary==2.7.5
pytz==2018.5
uWSGI==2.0.17.1

Thank You <3

Hossein Keramati Tavallaei

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2018-10-03 13:04:45 Re: BUG #15307: Low numerical precision of (Co-) Variance
Previous Message geizon 2018-10-03 12:01:53 PgAdmin Server Status Blank