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.