From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: keramati_hossein@ae.sharif.edu
Subject: BUG #15417: 'ascii' codec can't encode characters
Date: Wed, 03 Oct 2018 12:32:56 +0000
Message-ID: <15417-e2f4ecad8302a0bf@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15417
Logged by: Hossein Keramati
Email address: keramati_hossein@ae.sharif.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, keramati_hossein@ae.sharif.edu
Subject: Re: BUG #15417: 'ascii' codec can't encode characters
In-Reply-To: <15417-e2f4ecad8302a0bf@postgresql.org>
References: <15417-e2f4ecad8302a0bf@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox