escape/unescape for storing/restoring in/from sqlite is improved