defensive code for downloads, unicode string