× 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.



> The PDF has been encoded using base64 encoding.  According to our web
> group, who is supplying the XML file, this is supposed to be a standard
> practice for sending non-text objects using XML.  We've been told that
> the encoding and decoding should be part of any standard XML parser.

Hmmm... I'm far from an XML expert, but this is the first time I've heard
of base64 and XML being used together.  It's a good idea, though! It'll
definitely solve the escaping issues, and make the PDF file a valid text
document.

> I've been working on doing the parsing myself in RPG since we only want
> a few tags but the PDF isn't converting correctly.  Some of the
> characters ('[' for example) aren't converting properly.

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?

If it's in the XML tags then it's probably a conversion issue.

> We're also losing some characters.  I'm hoping that the SAX parser will
> recognize the encoded PDF and handle the decoding for me.  I am
> wondering if I may still have a conversion issue with the output but I
> won't know until I try.

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

> My latest attempts at the conversion involve using iconv() and some
> examples of yours I found in the archives.

Well, if I wrote it, it's gotta be good! :)  I doubt that iconv() would
cause you to lose characters, though.  What are you translating from/to?
Why do you even need iconv() rather than O_TEXTDATA?


> Right now it's returning 0 for bytes converted and I'm trying to figure
> out why.  If you know where I can find better documentation than what's
> in the information center I'd really appreciate it.

Documentation for what? XML? Base64? The IBM Parser? Expat? iconv?
codepages?

Heh, I envy you. That project sounds like the kind of challenge that I
enjoy overcoming. (My current projects are borrrrrringggg....)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.