Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Apply UUEncode to a String
How To Apply UUEncode to a String? - PHP Script Tips - PHP Built-in Functions for Strings
✍: FYIcenter.com
UUEncode (Unix-to-Unix Encoding) is a simple algorithm to convert a string of any characters into a string of printable characters. UUEncode is reversible. The reverse algorithm is called UUDecode. PHP offeres two functions for you to UUEncode or UUDecode a string: convert_uuencode() and convert_uudecode(), Here is a PHP script on how to use them:
<?php $msgRaw = " From\tTo\tSubject Joe\tLee\tHello Dan\tKia\tGreeting"; $msgEncoded = convert_uuencode($msgRaw); $msgDecoded = convert_uudecode($msgEncoded); if ($msgRaw === $msgDecoded) { print("Conversion OK\n"); print("UUEncoded message:\n"); print("-->$msgEncoded<--\n"); print("UUDecoded message:\n"); print("-->$msgDecoded<--\n"); } else { print("Conversion not OK:\n"); } ?>
This script will print:
Conversion OK UUEncoded message: -->M1G)O;0E4;PE3=6)J96-T#0I*;V4)3&5E"4AE;&QO#0I$86X)2VEA"4=R965T #:6YG ` <-- UUDecoded message: --> From To Subject Joe Lee Hello Dan Kia Greeting<--
The output shows you that the UUEncode string is a multiple-line string with a special end-of-string mark \x20.
2007-04-21, 4694👍, 0💬
Popular Posts:
How To Control Vertical Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By d...
What will be printed as the resultof the operation below: int x; int modifyvalue() { return(x+=10); ...
Is Session_End event supported in all session modes ? Session_End event occurs only in “Inproc mode”...
When should the method invokeLater() be used? This method is used to ensure that Swing components ar...
How can I search for data in a linked list? Unfortunately, the only way to search a linked list is w...