Fix double encoding in emails

Create a new function for getting strings from the DB which
allows utf encoding. Updates all model generators to use this
function.