encoding messages in utf-8