Convert to UTF-8 iff it's actually a string

http://manage.dimagi.com/default.asp?124462#703816