Re: SQLite and Null Character

2009-07-06 Thread Andrew Fong
The SQLite shell doesn't like the null character either. Not sure how to escape it though. For that matter, I'm not sure how to escape anything in SQLite. The only way I could enter in unicode was to pass it in directly (e.g as opposed to some ASCII representation to unicode) or to use a binary bl

Re: SQLite and Null Character

2009-07-06 Thread Alex Gaynor
On Mon, Jul 6, 2009 at 11:52 AM, Andrew Fong wrote: > > I'm using a SQLite3 backend on Python 2.6 and saving a unicode string > with the null character (u'\x00') results in everything after that > character being truncated. > > For example: > > m = MyModel(name=u'abc\x00def') > m.save() > MyModel

SQLite and Null Character

2009-07-06 Thread Andrew Fong
I'm using a SQLite3 backend on Python 2.6 and saving a unicode string with the null character (u'\x00') results in everything after that character being truncated. For example: m = MyModel(name=u'abc\x00def') m.save() MyModel.objects.get(pk=m.pk).name # => u'abc' I've tried using both the sqlit