Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can we figure out why certain uuencoded files are not decoding properly using Python?
    primarykey
    data
    text
    <p>We are trying to decode some uuencoded PDF files that are embedded in a txt file.</p> <p>The problem we have is that most of the PDF files decoded just fine using Python's uuencode library. Here is the code:</p> <pre><code>try: decoded_file,m=uudecode(fileString) except: decoded_file='' </code></pre> <p>However, some of the files cannot be opened after they are decoded. We receive the message "There was an error opening this document. The file is damaged and could not be repaired."</p> <p>The only thing we could find on Google is that our files could've been encoded using base64 and the Python uuencoding module only supports base32. Is there a way that we could tell whether it was uuencoded using base64 or base32?</p> <p>Here is an example of a txt file that had an embedded uuencoded pdf that we successfully decoded: <a href="http://www.sec.gov/Archives/edgar/data/1108046/000000000011020832/0000000000-11-020832.txt" rel="nofollow">http://www.sec.gov/Archives/edgar/data/1108046/000000000011020832/0000000000-11-020832.txt</a></p> <p>And here is an example of one that failed: <a href="http://www.sec.gov/Archives/edgar/data/914257/000000000011005978/0000000000-11-005978.txt" rel="nofollow">http://www.sec.gov/Archives/edgar/data/914257/000000000011005978/0000000000-11-005978.txt</a></p> <p>While we are decoding these in Python no errors pop up of any kind and everything seems to be working as it should. What could be causing them to not decode properly? Is there a way we could flag this while we are processing them?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload