UUencode Encoding¶
Uuencode, short for Unix-to-Unix encoding, is a binary-to-text encoding mechanism originally designed to transfer binary data over mediums that only support text, such as email or newsgroups. It encodes binary files into a text format that can be easily transmitted and decoded back into their original form.
<?php
$phpString = 'Well, I can say: 你好!' ;
$encoded = convert_uuencode($phpString);
print $encoded.PHP_EOL;
//:5V5L;"P@22!C86X@<V%Y.B#DO:#EI;WOO($`
//`
$decoded = convert_uudecode($encoded);
print $decoded.PHP_EOL;
//Well, I can say: 你好!
?>
See also Php Base64 encode/decode – best practices and use cases, convert_uuencode and Uuencoding with PHP.
Related : Base 64 Encoding