[1.7.x] Fixed storing of binary fields and unicode textfields for Oracle/Python3

Backport of 6bb6df2943 from master