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



Yes Joe, but every time we go to use that power tool named Java the lights
dim in the entire neighborhood before it actually starts running. <tic>
But you have to wonder why in nearly 2005 anyone would use a pound sign
(which is not an invariant character) in program code whose purpose is to
encode characters. How ironic is that!

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Joe Pluta
Sent: Thursday, December 02, 2004 10:13 PM
To: 'Web Enabling the AS400 / iSeries'
Subject: RE: [WEB400] Question on CGIDEV2

> From: Brad Stone
> 
> So, with what I want to do, with eRPGSDK I can do:
> 
> #loadTemplate('anyfile.ext')
> #replaceData('<':'&lt;')
> #writeSection
> 
> and I'm done.  What I'm doing is showing _why_ in the eRPG
> SDK I chose to not use delimited tags for replacement
> fields.

Of course, if you were using Java instead of RPG, you'd include the
wonderful Open Source htmlparser.jar and simply do this:

        out.write(Translate.encode(myOutput));

This would convert ALL non-ISO-8859-1 characters in the String myOutput
to their correct character entity references at one go (as opposed to
the multiple calls to #replaceData that you have to do).  But hey, why
use a power tool on a screw when you can bang it in with that big old
RPG hammer?

<g>

Joe

_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.