[SQLObject] Why does converters.py/stringLikeConverter escape linebreaks and others
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Thomas S. <de...@af...> - 2013-06-05 06:54:27
|
Hey folks, I was wondering why the sqlrepr from converters.py is escaping linebreaks and other chars for postgres. I'm talking about this piece of code: sqlStringReplace = [ ("'", "''"), ('\\', '\\\\'), ('\000', '\\0'), ('\b', '\\b'), ('\n', '\\n'), ('\r', '\\r'), ('\t', '\\t'), ] This causes for e.g. \ to multiply. when I comment out everything but the escaping of the single quote everything works as aspected. I don't see the reason why this is done in the first place. Could anyone please explain this to me and why this is done when saving but not undone when loaing? Regards Thomas -- Programmierer Affective Internet Services Inh. R. Tissler Hammer Str. 39 48153 Münster Tel: 0251-14989390 Fax: 0251-14989395 Web: http://www.affective.de Email: si...@af... |