Encode utf-8 before dumping to stdout