Fix missing utf8 encoding

Also some older, smaller things for which I obviously forgot to open a PR a couple of month ago. My bad.