Encode PG Special Characters  (Develop)

This is the develop version of #168