Encode fields in UTF-8 when dumping assignment data.

Closes #347.