Pre-RFC: write_str and write_fmt methods

(the other reason would be making work with files with different encoding from utf-8 a bit clearer; I’ve already mentioned here)