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