|
When I compare hex-to-hex they are the same. Yes, it is a GIF. The goal is to read the image into a variable that can be passed back to a calling program to ultimately be displayed in a browser. Currently, the browser is displaying the åñã / On 1/21/06, Simon Coulter <shc@xxxxxxxxxxxxxxxxx> wrote: > > On 22/01/2006, at 3:16 AM, Kyle Collie wrote: > > > If I do a wrklnk on an IFS file, I see this: > > > > GIF89a ÷ ÿÿÿðíîGFG... > > > > But in debug, my temp variable contains this: > > > > åñã / 7 0ÒÓåãå x¿ÝzÞ^xÐÞ ~xzwÝ(r) (í ... > > > > Not nearly the same. > > > > What am I missing? If is a codepage issue? > > At least three things: > 1) Your code is doing a binary read. What makes you think WRKLNK is > doing the same? > > 2) This output: > GIF89a ÷ ÿÿÿðíîGFG... > tells me you are viewing the contents of a GIF image file. GIF files > are binary but use ASCII code points. The fact that WRKLNK (really DSPF > file but ...) shows the characters GIF89a on your green screen in an > EBCDIC CCSID tells me it is converting the data otherwise the > characters wouldn't be recognisable. Thus DSPF is converting from the > CCSID of the file (probably 819) to the CCSID of the job (probably 37) > and is doing so, probably, because it opens the file using O_TEXTDATA. > > 3) Debug always shows the contents of variables using CCSID 65535 > (described in the help text) which means no character conversion is > performed. It shows the raw content of the variable. > > When viewing data in binary you can only rely on the hexadecimal code > points of each character. From the above 3 points you can see that the > data in debug is the correct output. The data in DSPF has, probably, > been converted from ASCII to EBCDIC. > > Using the F10=Display Hex option in DSPF will show you the hex data. > This should match the hex output in debug. > > NOTE:- On 530 DSPF shows the real Hex data from the file content. On > some earlier releases DSPF would show the Hex values of the converted > output which is not much use at all. > > NOTE:- On some early releases DSPF only shows Hex output when using a > 24*80 display device. It will not show hex output in wide-screen > (27*132) mode--also less than helpful. I see this "oversight" has been > corrected in 530. I don't know in exactly what release they fixed this. > > Regards, > Simon Coulter. > -------------------------------------------------------------------- > FlyByNight Software AS/400 Technical Specialists > > http://www.flybynight.com.au/ > Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ > Fax: +61 3 9419 0175 \ / > X > ASCII Ribbon campaign against HTML E-Mail / \ > -------------------------------------------------------------------- > > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.