ensure utf-8 encoding.