more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day, monks. I've been playing with SQLite alot lately, and I'm trying to find a way to add binary attachments to the database. The SQLite docs recommend Base64 encoding, so I thought I'd experiment with that a bit.
Here's my program to encode files in Base64:
And the matching decode program:
Here's what I tried to test it:
When I try to open yis.pdf with Acrobat Reader, it says there's an error in the file. The original PDF works fine. Any suggestions? UPDATE: I moved these PDFs to my Linux box and used hexdump -C to look at them - it looks like an endline issue (yis.pdf has Windows-style endlines). I tried adding local $/ = "\n"; to each file, but that didn't seem to help. _______________ DamnDirtyApe Those who know that they are profound strive for clarity. Those who would like to seem profound to the crowd strive for obscurity. --Friedrich Nietzsche In reply to Problem Encoding/Decoding PDF with MIME::Base64 by DamnDirtyApe
|
|