Author William.D..Colburn
Recipients William.D..Colburn, ezio.melotti, terry.reedy
Date 2012-12-31.00:00:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
What it should do is be consistent (predictable) in it's handling of
input and output.  If it accepts unicode and outputs unicode, then it
should accept unicode and output unicode, not accept garbage and then
barf.  Valid data should be consistantly valid, and invalid data
should be consistently invalid.   It is bad behavior for a system to
allow invalid data in that can't be recovered or handled.

On Sun, Dec 30, 2012 at 9:32 AM, Ezio Melotti <> wrote:
> Ezio Melotti added the comment:
>> Treating invalid data as sometimes valid and sometime as invalid is a problem.
> What is valid is defined by your application.  AFAIU sqlite3 defaults to utf-8, but it's able to work with latin1 data as well.  The fact that you are mixing utf-8 and latin1 is an error in your application, and while it might be nice if sqlite3 warned you about it, it's not necessarily its responsibility.  Even thought it's a really bad idea, you might want to store data with different encodings and still being able to retrieve them using the right text_factory.
> However while trying to reproduce the issue I noticed a possible inconsistency and reported it on #6010.
> ----------
> stage:  -> committed/rejected
> superseder:  -> unable to retrieve latin-1 encoded data from sqlite3
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2012-12-31 00:00:11William.D..Colburnsetrecipients: + William.D..Colburn, terry.reedy, ezio.melotti
2012-12-31 00:00:11William.D..Colburnlinkissue16783 messages
2012-12-31 00:00:10William.D..Colburncreate