fix bug 1037537 - encode utf-8 properly, and remove NULL characters which postgres will not allow to be imported into TEXT NOT NULL columns
Merge pull request #2187 from rhelmer/bug1037537-fetch-adi-failing-on-bad-unicode

fix bug 1037537 - encode utf-8 properly, and remove NULL characters whic...