Re: Setting the encoding in pysqlite2

2005-08-26 Thread Gerhard Haering
On Thu, Aug 25, 2005 at 01:15:55AM -0700, Michele Simionato wrote: > An easy question, but I don't find the answer in the docs :-( > I have a sqlite3 database containing accented characters (latin-1). > How do I set the right encoding? For instance if I do this: [...] You cannot set the encoding d

Re: Setting the encoding in pysqlite2

2005-08-26 Thread Martin v. Löwis
Michele Simionato wrote: > Well, the issue is not how to input text in the database from Python > (it is enough to use literal unicode strings); > in my case the database has been generated from a text file containing > accented chars, using .import, > and it seems I cannot read it from Python beca

Re: Setting the encoding in pysqlite2

2005-08-26 Thread Reinhold Birkenfeld
Michele Simionato wrote: > An easy question, but I don't find the answer in the docs :-( > I have a sqlite3 database containing accented characters (latin-1). > How do I set the right encoding? For instance if I do this: I think you should ask on the pysqlite-devel list. Reinhold -- http://mail.

Re: Setting the encoding in pysqlite2

2005-08-26 Thread Michele Simionato
Well, the issue is not how to input text in the database from Python (it is enough to use literal unicode strings); in my case the database has been generated from a text file containing accented chars, using .import, and it seems I cannot read it from Python because of the unicode error :-( Mic

Re: Setting the encoding in pysqlite2

2005-08-25 Thread Renzo
Michele Simionato ha scritto: > An easy question, but I don't find the answer in the docs :-( > I have a sqlite3 database containing accented characters (latin-1). > How do I set the right encoding? For instance if I do this: > Hi, i usually use this "string" method: encode([encoding[,errors]])