So from what Adrien showed me, it seems with -11 there is an INSERT being done with: E'\\x...' while with -12 it becomes: E'\x...'. So there seems to be some escaping issue. I'll be busy tomorrow but I'll look into it monday and I hope this is enough clue for me to find out what's the problem here. Thanks Adrien. Thomas