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



That's what I planned on doing, unless there is an easy
way.

In other words:

Scan string
If found, check for si, so positions in document.  If the
location of the scan falls between any of the si, so, then
don't do the replace.

Unless there is an easier way.  :)

On Fri, 3 Nov 2006 15:30:57 +1100 
 Kevin Wright <Kevin.Wright@xxxxxxxxxxxx> wrote:
Hi Brad,

Roll your own by only scanning non-DBCS, ie count
shiftout and shiftin bytes
and only attempt to replace when not in DBCS. Can you
tell I've been nearby
when this has been necessary?

There may be an API that will do it for you as well. qlg*
I think.   

Regards,

Kevin W. 

-----Original Message-----
From: Brad Stone [mailto:brad@xxxxxxxxxxxx]
Sent: Friday, 3 November 2006 3:47 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: More Stream File and DBCS issues...


On Fri, 3 Nov 2006 08:11:01 +1100 
 Kevin Wright <Kevin.Wright@xxxxxxxxxxxx> wrote:
Also could the DBCS in question contain the
apostrophe
character in one of
its bytes? 

Ding ding ding!  Bingo.  We have a winner!

I am doing a replace of characters in the string before
writing it.  I am doing (, ) and \ since these have to
be
translated to \(, \) and \\ respectivley.

One of the DBCS characters' bytes is x'4D' which is the
same as the hex for the ( character.

Now comes the fun question that I hope there is an easy
answer to.

When scanning a string for a character, is there a way
to
know if it has DBCS data in it?  And if not, how would
this
problem be prevented?  I guess I had assumed (wrongly)
that
DBCS data couldn't possibly be comprised of the same
hex
values as another SBCS characters...
-- 

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.

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


Bradley V. Stone
BVS.Tools
www.bvstools.com

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.