|
Hiya Michael,
XML doesn't require you to use an entity reference for Unicode
characters. Provided you are using a Unicode encoding, you can just put
the character in the document, unescaped.
The problem most people run into (whether escaped or not) is that EBCDIC
simply doesn't contain one of the characters in their XML. (This
includes your "greater than or equal" character... it doesn't exist in
any flavor of EBCDIC that I'm familiar with. (And it's not alone...
there are perhaps 300,000 characters that exist in Unicode but aren't
available in ASCII or EBCDIC.)
So, you can have RPG parse it into a UCS-2 (another Unicode) field, and
it should work nicely. But, as soon as you try to convert it to EBCDIC
(for example, to display it on a 5250 screen, or save it to an EBCDIC
field in a database, etc) you'll have a challenge to overcome. This is
where you might do a find/replace (as Henrik suggests) to convert the
character to something else.
If you store it wholly in Unicode fields (UCS-2, UTF-8, UTF-16, etc)
then you'll be okay. You could even send it back out in an HTML, XML,
JSON, etc document, and be fine. However, experience has shown that on
IBM i, folks usually need to convert it to EBCDIC at some point, and
that's where things go awry.
-SK
On 9/5/2012 12:30 PM, Michael Naughton wrote:
>
> I'm generating the XML in a Lotus Domino agent on a Windows server
> (very much like a Visual Basic environment). Basically, right now I'm
> sending everything with an ASCII number greater than 127 as a &# ...
> string.
>
--
This is the RPG programming on the IBM i / System i (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-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.