NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_uuencode(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_uuencode - Binary-to-text encoding using "htuu" encoding

Table Of Contents

Synopsis

Description

This command performs a binary-to-text encoding on string. The encoded string will be approximately 33% longer than the original by using he base64 encoding scheme. The command is kept for backward compatibility, the command ns_base64encode should be used instead.

NOTE: This stype of encodeing is sometimes called "htuu". This command converts the specified argument to RFC 1113 printable encoding format. This technique is similar to the familiar Unix uuencode format in that it maps 6 binary bits to one ASCII character (or more aptly, 3 binary bytes to 4 ASCII characters). However, RFC 1113 does not use the same mapping to printable characters as uuencode.

ns_uuencode ?-binary? ?--? string

When the option -binary is used, the Tcl byte array value of the provided input argument is used and no UTF-8 interpretation is performed.

EXAMPLES

 oss2:nscp 7> ns_uuencode test
 dGVzdA==
 
 oss2:nscp 6> ns_uudecode dGVzdA==
 test

See Also

ns_base64, ns_uudecode

Keywords

encoding, global built-in