I have this code:
$input = fopen("input.uue", "rb");
$output = fopen("output.tar.gz", "wb");
$string = fread( $input, 10000000 );
$converted_string = convert_uudecode( $string );
echo $converted_string;
echo fwrite( $output, $converted_string );
But convert_uudecode returns just 2 bytes instead of dozens.
"input.uue" is 100% correct file (I can open it by my archiver).
What's wrong?
UPD: I've removed initial 'begin ...' and 'end', added by uuencode() tool, but now it reads just 87 bytes... UPD2 Solved. The case was the difference between UNIX's and Windows's end-of-line symbols.
tr -d '\15\32' < windows_encoded_file > unix_encoded_file
solved the problem.