out =
encode (obj, charsetName)
¶Encode string in a given character encoding.
obj must be scalar.
charsetName (charvec) is the name of a character encoding. (TODO: Document what determines the set of valid encoding names.)
Returns the encoded string as a uint8
vector.
See also: string.decode.