binary decode

binary decode encoding data

Decodes the string data to a string of bytes (characters from \u0000\u00ff) according to the encoding rule encoding. The encoding must currently be one of base64, hex, or uuencode.

This functionality became available due to TIP #317 .


AMG: There's a bug in the base64 decoder [1 ] that causes it to drop the last output character if there's any trailing whitespace in the input base64 text. A simple workaround is to first call [string trimright] on the input.


See also