Generate utf-8 JSON when possible

Like #286, but for 0.9.x.