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



Hi Steve,

The strange characters you see are known as a "byte order mark". They have nothing to do with an IPL, they are data that's added to the file by whatever tool created it.

Byte order marks (BOMs) are part of the Unicode standard. They were designed originally for UCS-2/UTF-16 character sets so that a tool reading the file could distinguish between big-endian and little-endian numbers in those double-byte formats.

Perhaps strangely, a BOM was eventually added for UTF-8 as well. It's strange because UTF-8's byte order is well-defined, and never changes. But, it was added as a way to distinguish UTF-8 from other forms of Unicode automatically. (Most systems do not have a CCSID, or it's equivalent, in their file system, so the only way to distinguish different character sets is by the contents of the file.)

The Unicode standard *specifically* says that you should not use a BOM in UTF-8 as a general rule, because it will defeat one of the major advantages of UTF-8: compatibility with basic ASCII formats.

Anyway, I know that IBM i does have some support for BOMs, but without researching it, I don't remember what release/PTF level you need to be at, or how they work.

Make sure your file is marked with the proper CCSID (I asked for that information in my last message, but you didn't provide it in your reply.) Based on the BOM you posted, your data is probably CCSID 1208.

If having it marked as 1208 doesn't cause the BOM to be handled properly, I'd contact IBM, see if there are PTFs that will help.



On 12/22/2010 7:28 AM, sjones@xxxxxxxxxxxxxx wrote:
Scott:

When I compare the files from yesterday to previous ones, the new ones
have  appended in the front. When viewing with xml editor it doesnt
appear but viewing with a hex editor it does. We did IPL yesterday,
could that have possibly changed something? If I remove that from the
file, it does process.


Steve Jones





Re: XML Into

Scott Klement
to:
RPG programming on the IBM i/System i
12/21/2010 06:48 PM


Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
Please respond to RPG programming on the IBM i / System i






Hello sjones,

According to the Information Center, error code 302 is:

The parser does not support the requested CCSID value or
the first character of the XML document was not '<'.

Have you looked at your file? Which CCSID is it marked with? If you
take the hex value of the first character in the file, does it match the
hex value of the< character in the specified CCSID?

Or, are you overriding to a different CCSID in your program? If so,
does the first character in the file match the hex value of the
overridden-to CCSID?


On 12/21/2010 3:50 PM, sjones@xxxxxxxxxxxxxx wrote:
Today I started getting the following error The XML parser detected
error
code 302

This program has ran for the last week without any issues. Anyone have
some thoughts on what is causing this? The xml file is residing on the
IFS



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.