id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 6692 Saving NUL character truncates string using SQLite Alexandre Martani nobody "When I try to save a string containing NUL character (\x00), only the part before the character is saved. I have created a simple model: {{{ class Test(models.Model): content = models.TextField() }}} And this happens: {{{ >>> from mysite.test.models import Test >>> test = Test(content=""blabla\x00blablabla"") >>> test.content 'blabla\x00blablabla' >>> test.save() >>> test.pk 1 >>> Test.objects.get(pk=1).content u'blabla' >>> test.content 'blabla\x00blablabla' }}} The end of the string is simply lost, no errors are raised, nothing. Since python supports NUL character in strings, Django should support them too, or just drop it, but not losing all the end of the string. This happens on Django 0.96.1 and SVN, using SQLite database." closed Database layer (models, ORM) dev duplicate Unreviewed 0 0 0 0 0 0