Re: Getting adaped output from unicode text, without a connection - Mailing list psycopg

From Adrian Klaver
Subject Re: Getting adaped output from unicode text, without a connection
Date
Msg-id 51EC46FB.40107@gmail.com
Whole thread Raw
In response to Getting adaped output from unicode text, without a connection  ("Hefferon, James S." <jhefferon@smcvt.edu>)
Responses Re: Getting adaped output from unicode text, without a connection
List psycopg
On 07/21/2013 11:56 AM, Hefferon, James S. wrote:
> Hello,
>
> I need to write some static .sql files (just as an explanation, it is startup code for Django).  Some of the strings
arenon-ascii.  I'm stumped about how to get utf-8 instead of latin-1 in the file. 
>
> I'm generating the .sql as strings, without a connection.  I found a prior message on this list that suggested what
todo (1) and came up with this routine. 
>

>
> I expect that I am asking a dopey question (I'm not very sure what I am doing) but I'd appreciate a pointer even if
itmakes me feel dumb. 

My question would be, why invoke psycopg2 at all?
Can you not just write out the strings?

>
> Thanks,
> Jim
>
> (1) http://www.postgresql.org/message-id/AANLkTik+tq8hbnCj3ROmOLNV1DSw48o4sDoSvnxTN3R8@mail.gmail.com
>


--
Adrian Klaver
adrian.klaver@gmail.com


psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: Getting adaped output from unicode text, without a connection
Next
From: Christophe Pettus
Date:
Subject: Re: Getting adaped output from unicode text, without a connection