(OHAI-516) Escape and encode data to UTF-8
(OHAI-516 FIX) Base64 encode userdata if application/octet-stream