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 :-(

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 --

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 because

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

Setting the encoding in pysqlite2

2005-08-25 Thread Michele Simionato
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: #-*- encoding: latin-1 -*- from pysqlite2 import dbapi2 as sqlite import os DBFILE=/tmp/example.db def

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]]) An