Fix doctrine handling of UTF-8 fields.

We ran into an issue using the new REST API where some records weren't
returning due to incorrect encoding. It turned out that the field values for
the doctrine objects being returned weren't properly encoded for UTF-8.  This
commit fixes that.
Merge pull request #3008 from giant-rabbit/feature/DoctrineUTF-8Fix

Fix doctrine handling of UTF-8 fields.