× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>Hmmm... base64 should decode to the exact same binary values that you
>started with. I must be missing a step here...   or, wait... do you mean
>'[' in the XML tags or in the decoded PDF?

The '[' is in the decoded PDF.  I have the original PDF and the XML file.  
After I run the XML through my program the '[" becomes 1/2 (as a single byte).  
As far as I can tell the decoding is working fine.

>Losing characters using IBM's parser?  Or your own?

Currently I'm doing the parsing myself.  I'm using a combination of memchr() 
and strstr() to search a user space that the XML is read into.  The 'Searching 
a user space' thread from a few days ago has more details on that.

I've checked the beginning and the end of the decoded PDF file and they match 
the original document.  I can see characters in the decoded PDF that don't 
appear in the original and characters in the original that don't appear in the 
decoded PDF.  The net is that I'm 7 bytes short.  As far as I can tell it's 
always a single character and they seem to be random (at least I haven't 
identified the pattern yet).  The PDF is broken into 76 byte lines.  Walking 
through the code for several iterations doesn't show that any characters are 
missing.

>What are you translating from/to?  Why do you even need iconv() rather than 
>O_TEXTDATA?

I don't know what O_TEXTDATA is.  Is it a flag on the open?  We discovered that 
the PDF is being read as ASCII and when we wrote the decoded data it was trying 
to convert from ascii to ascii and the result was garbage.  So now we have read 
as ascii, convert to ebcdic using iconv(), convert back to ascii during write.

>Documentation for what?

Documentation for iconv().  I found some more information over the weekend that 
might explain better.


Normally I would enjoy this type of thing more but I have a deadline of 
Wednesday and it's starting to get frustrating.

Rick

Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain legally 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.