As I see, the code assumes the data is not utf8 and converts it to utf8. But it might be already utf8. So it would be better if it was optional.