Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to configure Psycopg2's client encoding. See the <a href="http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#unicode" rel="noreferrer">SQLAlchemy documentation</a>:</p> <blockquote> <p>By default, the psycopg2 driver uses the <code>psycopg2.extensions.UNICODE</code> extension, such that the DBAPI receives and returns all strings as Python Unicode objects directly - SQLAlchemy passes these values through without change. Psycopg2 here will encode/decode string values based on the current “client encoding” setting; by default this is the value in the <code>postgresql.conf</code> file, which often defaults to <code>SQL_ASCII</code>. Typically, this can be changed to <code>utf-8</code>, as a more useful default:</p> <pre><code>#client_encoding = sql_ascii # actually, defaults to database # encoding client_encoding = utf8 </code></pre> <p>A second way to affect the client encoding is to set it within Psycopg2 locally. SQLAlchemy will call psycopg2’s <code>set_client_encoding()</code> method (see: <a href="http://initd.org/psycopg/docs/connection.html#connection.set_client_encoding" rel="noreferrer">http://initd.org/psycopg/docs/connection.html#connection.set_client_encoding</a>) on all new connections based on the value passed to <code>create_engine()</code> using the <code>client_encoding</code> parameter:</p> <pre><code>engine = create_engine("postgresql://user:pass@host/dbname", client_encoding='utf8') </code></pre> <p>This overrides the encoding specified in the Postgresql client configuration.</p> </blockquote> <p>The <code>client_encoding</code> parameter can be specified as a query string in the engine URL:</p> <pre><code> postgresql://user:pass@host/dbname?client_encoding=utf8 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload