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



Vern,

That's what's strange... both files start with the BOM, CCSID 819, and the
302 error..

I change the CCSID to 1208, and one of the files works fine. The other
still gets the 302 error.

Charles

On Fri, Mar 20, 2020 at 3:38 PM Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Charles - which one no longer gets the error? the one with CCSID 1208?
If so, that makes sense - the BOM is an optional thing with UTF-8,
XML-INTO might know that if the CCSID marks the file as UTF-8 - now is
there some option in XML-INTO that says, interpret as UTF-8 no matter what?

Vern

On 3/20/2020 4:24 PM, Charles Wilt wrote:
Ok this is getting weirder...

I've got two files...both have the BOM, when view via WRKLNK 5=Display
(F10-Hex)

405C5C5C 5C5C5C5C 5C5C5C5C 5CC28587 89959589 ************Beginni
EFBBBF3C 3F786D6C 20766572 73696F6E 3D22312E <?xml version="1.
3C737461 723A5368 6F775061 7274734D 61737465 <star:ShowPartsMaste

If I change the CCSID of the file from 819 to 1208, then DSPF ignores the
BOM, but you can still see it in the Hex
405C5C5C 5C5C5C5C 5C5C5C5C 5CC28587 89959589 ************Beginni
EFBBBF3C 3F786D6C 20766572 73696F6E 3D22312E <?xml version="1.0"
3C737461 723A5368 6F775061 7274734D 61737465 <star:ShowPartsMaste

And for one file, my RPG program using XML-INTO works and no longer gets
the error 302...

But for the other file, I'm still getting the 302!
Cause . . . . . : While parsing an XML document for an RPG procedure,
the
parser detected an error at offset 0 with reason code 302.

Thoughts?

Charles



On Fri, Mar 20, 2020 at 1:12 PM Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:


Here's the realivent Java code
import java.util.zip.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.BufferedOutputStream;

try
{
GZIPInputStream gzipInputStream = new GZIPInputStream(new
FileInputStream(f));
OutputStream o = new FileOutputStream(oFile);

byte[] buf = new byte[4096];
int len;
while ((len = gzipInputStream.read(buf)) > 0)
{
o.write(buf, 0, len);
}
gzipInputStream.close();
o.close();
}
catch (Exception e1)
{
error = e1.getMessage();
return -50;
}

Charles

On Fri, Mar 20, 2020 at 11:57 AM Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

All,

I've got an XML file being received g-zipped up.

We're using Java to unzip it..
D unGZip pr 10i 0 extproc(*Java:DZ:'UnGZip')
D string o
class(*Java:'java.lang.String')
const

But the resulting file has a CCSID of 819 and thus the BOM is not
expected.

Trying to use XML-INTO, we get error code 302 on the first character
(aka offset 0), which says that the first character is not a <

I'm surprised that the Java didn't set the CCSID to 1208...

Am I missing something?

Thanks!
Charles




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.