DS-1164 ensuring that UTF-8 encoding gets enforced

based on Villu Ruusmann's patch. Simple & straightforward fix.