added an encodeMessage overload for utf8string