Encoding as per RFC 5987
Returns the encoded str with charset UTF-8. If arg
is an object, the str
and
lang
properties are used for the content and language, respectively.
Otherwise, arg
cast as string and the defaultLang
property of the encode
function will be used.
Returns an object with properties str
and lang
. Currently only UTF-8 is
supported.