Re: Getting adaped output from unicode text, without a connection
От | Adrian Klaver |
---|---|
Тема | Re: Getting adaped output from unicode text, without a connection |
Дата | |
Msg-id | 51EC46FB.40107@gmail.com обсуждение исходный текст |
Ответ на | Getting adaped output from unicode text, without a connection ("Hefferon, James S." <jhefferon@smcvt.edu>) |
Ответы |
Re: Getting adaped output from unicode text, without a connection
|
Список | 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 по дате отправления: